Commit 57bca1f0 authored by Jeremy Hylton's avatar Jeremy Hylton

Add -v option to control whether tracebacks are printed.

parent e4aaa094
......@@ -32,6 +32,8 @@ import cStringIO
import traceback
import types
VERBOSE = 0
def get_refs(pickle):
refs = []
f = cStringIO.StringIO(pickle)
......@@ -67,6 +69,7 @@ def main(path):
data, serial = fs.load(oid, "")
except:
print "oid %s failed to load" % hex(u64(oid))
if VERBOSE:
traceback.print_exc()
noload[oid] = 1
......@@ -93,4 +96,12 @@ def main(path):
if __name__ == "__main__":
import sys
main(sys.argv[1])
import getopt
opts, args = getopt.getopt(sys.argv[1:], "v")
for k, v in opts:
if k == "-v":
VERBOSE += 1
path, = args
main(path)
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