Fix zodb analyze with empty reports
Fix for this kind of errors: ``` (env)$ zodb analyze demo.fs ffffffffffffffff.. # ø Processed 0 records in 0 transactions Traceback (most recent call last): File "/srv/slapgrid/slappart8/srv/runner/project/zodbtools/env/bin/zodb", line 11, in <module> load_entry_point('zodbtools', 'console_scripts', 'zodb')() File "/srv/slapgrid/slappart8/srv/runner/project/zodbtools/zodbtools/zodb.py", line 130, in main return command_module.main(argv) File "/srv/slapgrid/slappart8/srv/runner/project/zodbtools/zodbtools/zodbanalyze.py", line 305, in main report(analyze(path, use_dbm, delta_fs, tidmin, tidmax), csv) File "/srv/slapgrid/slappart8/srv/runner/project/zodbtools/zodbtools/zodbanalyze.py", line 102, in report print "Average record size is %7.2f bytes" % (rep.DBYTES * 1.0 / rep.OIDS) ZeroDivisionError: float division by zero ``` and also small fixes for python3 compatibility /reviewed-on !9
Showing
Please register or sign in to comment