[issue355] smart upgrade crashes on serial or xen terminal

Peter Warasin at Labix Tracker tracker at labix.org
Fri Jan 25 07:24:41 PST 2008


New submission from Peter Warasin <peter at endian.com>:

if you try to smart upgrade through a serial console or a xen console smart
crashes with this traceback:

...
  File "/usr/lib/python2.4/site-packages/smart/backends/rpm/pm.py", line 309, in
__call__
    self.prog.show()
  File "/usr/lib/python2.4/site-packages/smart/progress.py", line 110, in show
    self.expose(topic, percent, *info)
  File "/usr/lib/python2.4/site-packages/smart/interfaces/text/progress.py",
line 108, in expose
    out.write(self._topicmaskn % (n, topic))
ValueError: unsupported format character '-' (0x2d) at index 9

This happens because getScreenWith() returns a window size of 0 for those
terminal emulations.
The attached patch returns a default value of 80 when the window size is 0.

----------
files: smart-0.52-termios-0width.patch
messages: 1289
nosy: peter-endian
priority: bug
project: smart
status: unread
title: smart upgrade crashes on serial or xen terminal

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue355>
_______________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smart-0.52-termios-0width.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20080125/85e7275b/attachment-0002.bin>


More information about the Smart mailing list