spinPrint might behave strangely for longer strings
Michael_E_Brown at Dell.com
Michael_E_Brown at Dell.com
Fri Feb 29 10:17:30 CST 2008
I think the better way would most likely be to just truncate the string we are printing.
def pad(s, n):
return s[:n] + ' ' * (n-len(s))
Pad it to 50 or so chars. You want to send a patch?
--
Michael
-----Original Message-----
From: firmware-tools-devel-bounces at lists.us.dell.com on behalf of Charles_Rose at dell.com
Sent: Fri 2/29/2008 5:27 AM
To: firmware-tools-devel at lists.us.dell.com
Subject: spinPrint might behave strangely for longer strings
Hello,
I ran into this cosmetic issue while in the text console. At first, was not able to see this in xterm or gnome-terminal. And then I started seeing this on gnome-terminal and xterm when I resized the window. Looks like when the string output by firmwaretools.pycompat.spinPrint is larger than the column width of the terminal, it has a scrolling effect on the string as the string wraps around - clearline() tries to clear only the last line. I ended up having screen-full of the animation below:
---
[root at PE1750 ~]# update_firmware --yes
Running system inventory...
Searching storage directory for available BIOS updates...
Checking PowerEdge Expandable RAID controller 4/Di Firmware - 422a
Available: pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x014a) - 422d
Found Update: pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x014a) - 422d
Checking System BIOS for PowerEdge 1750 - a12
Available: system_bios(ven_0x1028_dev_0x014a) - a12
Did not find a newer package to install that meets all installation checks.
Found firmware which needs to be updated.
Running updates...
\ Installing pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x01
| Installing pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x01
/ Installing pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x01
- Installing pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x01
\ Installing pci_firmware(ven_0x1028_dev_0x000f_subven_0x1028_subdev_0x01
---
The wrapping messes up logic. We could print the string once and cycle through the progress animation in the next line by itself.
Thanks,
Charles
_______________________________________________
firmware-tools-devel mailing list
firmware-tools-devel at lists.us.dell.com
http://lists.us.dell.com/mailman/listinfo/firmware-tools-devel
More information about the firmware-tools-devel
mailing list