[Python-apps-team] Bug#588900: petit: traceback if reading file fails due to permission errors

Michael Prokop mika at debian.org
Tue Jul 13 10:10:42 UTC 2010


Package: petit
Version: 1.0.3-1
Severity: normal


% petit --hash  ~log/syslog
Traceback (most recent call last):
  File "/usr/bin/petit", line 348, in <module>
    get_options(sys.argv[1:])
  File "/usr/bin/petit", line 135, in get_options
    hash(filename)
  File "/usr/bin/petit", line 164, in hash
    log = Log(args)
  File "/usr/share/petit/crunchtools.py", line 620, in __init__
    buffer = self.open_file(filename)
  File "/usr/share/petit/crunchtools.py", line 649, in open_file
    f = open(filename)                         
IOError: [Errno 13] Permission denied: '/var/log/syslog'

According exception handling without displaying the
traceback to the user would be nice. :)

regards,
-mika-





More information about the Python-apps-team mailing list