ufw-frontends icon indicating copy to clipboard operation
ufw-frontends copied to clipboard

failure when a log file cannot be found

Open baudm opened this issue 9 years ago • 0 comments

Original issue 21 created by baudm on 2013-10-13T18:39:40.000Z:

Hello!

When any of the supported log file location cannot be found, ufw-gtk doesn't start.

# ufw-gtk
/usr/lib/python2.7/site-packages/gfw/frontend_gtk.py:68: GtkWarning: Unknown property: GtkMenu.ubuntu-local
  self.ui.add_from_file(path)
Traceback (most recent call last):
  File "/usr/sbin/ufw-gtk-2.7", line 9, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/gfw/frontend_gtk.py", line 743, in main
    ui = GtkFrontend()
  File "/usr/lib/python2.7/site-packages/gfw/frontend_gtk.py", line 93, in __init__
    self._notifier = Notifier(callback)
  File "/usr/lib/python2.7/site-packages/gfw/frontend_gtk.py", line 37, in __init__
    gfw.event.Notifier.__init__(self, callback)
  File "/usr/lib/python2.7/site-packages/gfw/event.py", line 73, in __init__
    self._log = open('/var/log/messages.log', 'r')
IOError: [Errno 2] No such file or directory: '/var/log/messages.log'
Exception AttributeError: "'Notifier' object has no attribute '_log'" in <bound method Notifier.__del__ of <gfw.frontend_gtk.Notifier object at 0x9ee58ac>> ignored

(Actually, that's for users that use systemd/journal. At least on some of such systems, any of these log files cannot be found.)

ufw-frontends version: 0.3.2

baudm avatar Mar 25 '15 16:03 baudm