diff options
author | Guido van Rossum <guido@python.org> | 1992-03-31 19:04:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-31 19:04:48 (GMT) |
commit | 25d7cafd8a0650c9ca5185e095f85745b229acdc (patch) | |
tree | 40fa47bc8b8e76f18f53558957811cfa0402b358 /Lib/persist.py | |
parent | 3bc034bb7982078514acb829dcd95ffe67ea2d48 (diff) | |
download | cpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.zip cpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.tar.gz cpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.tar.bz2 |
posix -> os
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) |