Commit adf92861 authored by Tres Seaver's avatar Tres Seaver

Merge pull request #25 from navytux/fixup

Small fixups while learning ZODB
parents db0eb296 eda11559
......@@ -70,8 +70,6 @@ from ZODB.utils import u64, oid_repr, get_pickle_metadata
from ZODB.serialize import get_refs
from ZODB.POSException import POSKeyError
VERBOSE = 0
# There's a problem with oid. 'data' is its pickle, and 'serial' its
# serial number. 'missing' is a list of (oid, class, reason) triples,
# explaining what the problem(s) is(are).
......@@ -94,6 +92,7 @@ def report(oid, data, serial, missing):
print()
def main(path=None):
verbose = 0
if path is None:
import sys
import getopt
......@@ -101,7 +100,7 @@ def main(path=None):
opts, args = getopt.getopt(sys.argv[1:], "v")
for k, v in opts:
if k == "-v":
VERBOSE += 1
verbose += 1
path, = args
......@@ -127,7 +126,7 @@ def main(path=None):
except POSKeyError:
undone[oid] = 1
except:
if VERBOSE:
if verbose:
traceback.print_exc()
noload[oid] = 1
......
......@@ -10,7 +10,7 @@ from __future__ import print_function
import ZODB
from ZODB.FileStorage import FileStorage
from ZODB.utils import U64, get_pickle_metadata
from ZODB.referencesf import referencesf
from ZODB.serialize import referencesf
from six.moves import filter
def find_paths(root, maxdist):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment