mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Make a backup of the registry file on startup.
This commit is contained in:
parent
3590d2aac8
commit
b01886f537
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user