Package: shellsink
Version: 0.1.7
Severity: normal
Tags: patch
Hello,
shellsink crashes if ${HOME}/.bash_history_timestamp is empty.
Traceback of the issue (after removing the content of .bash_history_timestamp):
File "/usr/bin/shellsink-client", line 222, in <module>
main()
File "/usr/bin/shellsink-client", line 219, in main
client.send_command()
File "/usr/bin/shellsink-client", line 56, in send_command
if self.has_new_command():
File "/usr/bin/shellsink-client", line 87, in has_new_command
last_recorded_history_timestamp = self.last_recorded_history_timestamp()
File "/usr/bin/shellsink-client", line 100, in last_recorded_history_timestamp
old_history_timestamp = float(file.readline())
ValueError: empty string for float()
Removing that file fixes the issue.
The bug appears to be in line 98 of /usr/bin/shellsink-client.
Patch:
Change line 98 of /usr/bin/shellsink-client from:
if os.path.exists(self.history_timestamp):
to
if os.path.exists(self.history_timestamp) and
os.path.getsize(self.history_timestamp)>0 :
fixes the bug.
Regards,
Luca Invernizzi
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (900, 'unstable'), (600, 'experimental'), (600, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages shellsink depends on:
ii python 2.5.2-3 An interactive high-level object-o
shellsink recommends no packages.
shellsink suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]