GNOME Bugzilla – Bug 540898
Doesn't handle missing lircd.conf file
Last modified: 2008-06-30 16:43:13 UTC
On a default installation, lircd.conf is a ghost file (meaning it is owned by the lirc RPM but not present on the filesystem): Traceback (most recent call last):
+ Trace 201743
gnome_lirc_properties.run(sys.argv[1:], datadir)
return ui.RemoteControlProperties(gtk.glade.XML(ui_filename)).run()
self.__restore_hardware_settings()
if (not lirc.check_hardware_settings(remote) and
open(config.LIRC_DAEMON_CONF).read(), re.MULTILINE):
The current code reads: if not re.search(• r'^\s*include\s+%s\s*$' % re.escape(config.LIRC_REMOTE_CONF),• open(config.LIRC_DAEMON_CONF).read(), re.MULTILINE):• return False•
Adding this line before the re.search should do it: if not os.path.exists(remote_config): return True•
That seems OK because I guess that a missing lircd.conf is acceptable so it's OK for that check_hardware_settings() function to say that it is indeed sane. Please commit.
2008-06-30 Bastien Nocera <hadess@hadess.net> * gnome_lirc_properties/lirc.py: Handle the lircd.conf file being missing (it's not broken if it's not there!) (Closes: #540898)