[Zope3-checkins] CVS: ZODB/src/ZODB - fsrecover.py:1.20
Tim Peters
tim.one at comcast.net
Mon May 3 12:21:35 EDT 2004
Update of /cvs-repository/ZODB/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv6834/src/ZODB
Modified Files:
fsrecover.py
Log Message:
Separated Python imports from ZODB imports; put all global imports before
the first function defn.
=== ZODB/src/ZODB/fsrecover.py 1.19 => 1.20 ===
--- ZODB/src/ZODB/fsrecover.py:1.19 Mon May 3 12:12:51 2004
+++ ZODB/src/ZODB/fsrecover.py Mon May 3 12:21:34 2004
@@ -56,13 +56,36 @@
#
# position to start of input
# while 1:
-# if end of file: break
-# try: copy_transaction
+# if end of file:
+# break
+# try:
+# copy_transaction
# except:
-# scan for transaction
-# continue
+# scan for transaction
+# continue
+
+import sys
+import os
+import getopt
+import time
+from struct import unpack
+from cPickle import loads
+
+try:
+ import ZODB
+except ImportError:
+ if os.path.exists('ZODB'):
+ sys.path.append('.')
+ elif os.path.exists('FileStorage.py'):
+ sys.path.append('..')
+ import ZODB
+
+import ZODB.FileStorage
+from ZODB.utils import t32, u64
+from ZODB.FileStorage import RecordIterator
+
+from persistent.TimeStamp import TimeStamp
-import sys, os
def die(mess='', show_docstring=False):
if mess:
@@ -71,21 +94,8 @@
print >> sys.stderr, __doc__ % sys.argv[0]
sys.exit(1)
-try: import ZODB
-except ImportError:
- if os.path.exists('ZODB'): sys.path.append('.')
- elif os.path.exists('FileStorage.py'): sys.path.append('..')
- import ZODB
-
-
-import getopt, ZODB.FileStorage, time
-from struct import unpack
-from ZODB.utils import t32, u64
-from persistent.TimeStamp import TimeStamp
-from cPickle import loads
-from ZODB.FileStorage import RecordIterator
-
-class ErrorFound(Exception): pass
+class ErrorFound(Exception):
+ pass
def error(mess, *args):
raise ErrorFound(mess % args)
More information about the Zope3-Checkins
mailing list