Make a backup of the registry file on startup.

This commit is contained in:
Jeremy Fincher 2004-01-30 19:49:48 +00:00
parent 3590d2aac8
commit b01886f537

View File

@ -39,6 +39,7 @@ import re
import os
import sys
import atexit
import shutil
import os.path
if sys.version_info < (2, 3, 0):
@ -221,6 +222,7 @@ if __name__ == '__main__':
try:
# The registry *MUST* be opened before importing log or conf.
registry.open(registryFilename)
shutil.copy(registryFilename, registryFilename + '.bak')
except registry.InvalidRegistryFile, e:
sys.stderr.write(str(e))
sys.stderr.write(os.linesep)