gcommit: unknown error "float division"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Invalid
|
Undecided
|
Unassigned | ||
Bazaar GTK+ Frontends |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When doing "bzr gcommit", after clicking "commit", I get a popup with title "Unknown error" and saying "float division".
I hacked a bit errors.py so that it prints a traceback to stdout (and REALLY, PLEASE, it would be nice if this was done by default) and the traceback is:
Traceback (most recent call last):
File "/home/
unbound(*args, **kwargs)
File "/home/
self.
File "/home/
revprops=
File "/usr/local/
return unbound(self, *args, **kwargs)
File "/usr/local/
result = WorkingTree3.
File "/usr/local/
return unbound(self, *args, **kwargs)
File "/usr/local/
revprops=
File "/usr/local/
self.rev_id = self.builder.
File "/usr/local/
self.
File "/usr/local/
self.
File "/usr/local/
return self._pack_
File "/usr/local/
if not self.autopack():
File "/usr/local/
self.
File "/usr/local/
_packer_
File "/usr/local/
return self._create_
File "/usr/local/
new_
File "/usr/local/
write_index, pb)
File "/usr/local/
pb.
File "/home/
self.
ZeroDivisionError: float division
See: pb.update() passes len(nodes) (==0) for argument "total", so this code in ui.py line 63:
def update(self, msg=None, current=None, total=None):
if msg is not None:
if None not in (current, total):
happily divides by 0.
There is nothing in .bzr.log, in my opinion this proves the usefulness of having show_bzr_error print the traceback to stdout if the error is unexpected. Something like this:
...
except errors.BzrError, msg:
except errors.
except Exception, msg:
Changed in bzr-gtk: | |
status: | New → Fix Committed |
Changed in bzr-gtk: | |
status: | Fix Committed → Fix Released |
It's not rational to do "update(x, 0)", so the root bug is in Bazaar. But this can be worked around in bzr-gtk. Thus, I assign this to both.
(And I hope you mean stderr, not stdout)