diff options
Diffstat (limited to 'Lib/persist.py')
-rwxr-xr-x | Lib/persist.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/persist.py b/Lib/persist.py index 52cc6fb..ae7d58b 100755 --- a/Lib/persist.py +++ b/Lib/persist.py @@ -32,16 +32,16 @@ defaultfile = 'wsrestore.py' def save(): import __main__ - import posix + import os # XXX On SYSV, if len(defaultfile) >= 14, this is wrong! backup = defaultfile + '~' try: - posix.unlink(backup) - except posix.error: + os.unlink(backup) + except os.error: pass try: - posix.rename(defaultfile, backup) - except posix.error: + os.rename(defaultfile, backup) + except os.error: pass fp = open(defaultfile, 'w') writedict(__main__.__dict__, fp) |