[Checkins] [zopefoundation/ZODB] 29f75c: scripts/fsrefs: Fix -v

GitHub noreply at github.com
Thu Jul 24 18:20:40 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/ZODB
  Commit: 29f75cc6130052290c232ae6db7177cc0dcc1dde
      https://github.com/zopefoundation/ZODB/commit/29f75cc6130052290c232ae6db7177cc0dcc1dde
  Author: Kirill Smelkov <kirr at nexedi.com>
  Date:   2014-07-02 (Wed, 02 Jul 2014)

  Changed paths:
    M src/ZODB/scripts/fsrefs.py

  Log Message:
  -----------
  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.


  Commit: c6ebb373b422b0adc70d7bbc39734f0bba01711e
      https://github.com/zopefoundation/ZODB/commit/c6ebb373b422b0adc70d7bbc39734f0bba01711e
  Author: Kirill Smelkov <kirr at nexedi.com>
  Date:   2014-07-10 (Thu, 10 Jul 2014)

  Changed paths:
    M src/ZODB/scripts/netspace.py

  Log Message:
  -----------
  scripts/netspace: Fix so it runs

Currently that script does not run because of import error:

    $ python src/ZODB/scripts/netspace.py
    Traceback (most recent call last):
      File "src/ZODB/scripts/netspace.py", line 13, in <module>
  from ZODB.referencesf import referencesf
    ImportError: No module named referencesf

and that ZODB.referencesf module was moved to ZODB.serialize long ago in

    ec014812    (Move referencesf to ZODB.serialize.)
    ae7e113e    (Ack!  Deleted the wrong file in the last checkin.)
    355ff4ac    (One more try.  Commit the version with referencesf.)

only the conversion missed the netspace.py script.

Fix it.


  Commit: eda115591ee0c4316709b59e7292fa14702bc7a8
      https://github.com/zopefoundation/ZODB/commit/eda115591ee0c4316709b59e7292fa14702bc7a8
  Author: Kirill Smelkov <kirr at nexedi.com>
  Date:   2014-07-24 (Thu, 24 Jul 2014)

  Changed paths:
    M src/ZODB/scripts/fsrefs.py

  Log Message:
  -----------
  scripts/fsrefs: De-globalify verbose

As noted in recent commit, verbose option handling in fsrefs.py was
broken. On review Tres suggested to make VERBOSE a local variable as
currently it is used only in one function main().

Suggested-by: Tres Seaver


  Commit: adf92861902125c7ca70854d9354557806d45217
      https://github.com/zopefoundation/ZODB/commit/adf92861902125c7ca70854d9354557806d45217
  Author: Tres Seaver <tseaver at palladion.com>
  Date:   2014-07-24 (Thu, 24 Jul 2014)

  Changed paths:
    M src/ZODB/scripts/fsrefs.py
    M src/ZODB/scripts/netspace.py

  Log Message:
  -----------
  Merge pull request #25 from navytux/fixup

Small fixups while learning ZODB


Compare: https://github.com/zopefoundation/ZODB/compare/db0eb296e461...adf928619021


More information about the checkins mailing list