baudm / ufw-frontends

Graphical frontends for the Uncomplicated Firewall (UFW)
http://code.google.com/p/ufw-frontends/
GNU General Public License v3.0
41 stars 10 forks source link

Fix crash when no log in supported location can be found #1

Closed Enlik closed 10 years ago

Enlik commented 10 years ago

This can happen for example on systems that use Journal from systemd.

In this case, ufw-gtk exits with a traceback containing: IOError: [Errno 2] No such file or directory: '/var/log/messages.log' (this is the last log file tried).

The patch works around the issue by handling the error and disabling the widget in the "Events" tab.

(Journal support would be welcome as well.) This commit fixes issue 21 on ufw-frontends tracker.