summaryrefslogtreecommitdiffstats
path: root/Lib/persist.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-03-31 19:04:48 (GMT)
committerGuido van Rossum <guido@python.org>1992-03-31 19:04:48 (GMT)
commit25d7cafd8a0650c9ca5185e095f85745b229acdc (patch)
tree40fa47bc8b8e76f18f53558957811cfa0402b358 /Lib/persist.py
parent3bc034bb7982078514acb829dcd95ffe67ea2d48 (diff)
downloadcpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.zip
cpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.tar.gz
cpython-25d7cafd8a0650c9ca5185e095f85745b229acdc.tar.bz2
posix -> os
Diffstat (limited to 'Lib/persist.py')
-rwxr-xr-xLib/persist.py10
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)