Commit 29f75cc6 authored by Kirill Smelkov's avatar Kirill Smelkov

scripts/fsrefs: Fix -v

For this script verbose mode was added in 57bca1f0 (Add -v option to
control whether tracebacks are printed.) and was later broken in
6dd809d2 (Converted to a buildout and converted externals to
dependencies.) - the change forgot to add global specifier for VERBOSE
variable while moving its assignment into function context.

As a result currently we have

    $ python ./src/ZODB/scripts/fsrefs.py -v data.fs
    Traceback (most recent call last):
      File "./src/ZODB/scripts/fsrefs.py", line 155, in <module>
        main()
      File "./src/ZODB/scripts/fsrefs.py", line 104, in main
        VERBOSE += 1
    UnboundLocalError: local variable 'VERBOSE' referenced before assignment

Fix it.
parent 0be1494c
......@@ -94,6 +94,7 @@ def report(oid, data, serial, missing):
print()
def main(path=None):
global VERBOSE
if path is None:
import sys
import getopt
......
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