diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 4ab74b9b..14eb4e22 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -34,7 +34,11 @@ up, set a default for it first.""" import os, platform, sys, re import pwd import gtk, pango -import gio + +try: + import gio +except ImportError: + pass # set this to true to enable debugging output # These should be moved somewhere better. @@ -209,9 +213,12 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore): dbg(" VS_RCFile: config file located at %s" % self.rcfilename) self.call_parser(True) - monfile = gio.File(self.rcfilename) - monmon = monfile.monitor_file() - monmon.connect("changed", self.file_changed) + try: + monfile = gio.File(self.rcfilename) + monmon = monfile.monitor_file() + monmon.connect("changed", self.file_changed) + except NameError: + dbg ("gio module not found, config file monitoring disabled") def set_reconfigure_callback (self, function): dbg (" VS_RCFile: setting callback to: %s"%function) diff --git a/terminatorlib/keybindings.py b/terminatorlib/keybindings.py index af915a26..e7dc7b35 100644 --- a/terminatorlib/keybindings.py +++ b/terminatorlib/keybindings.py @@ -1,6 +1,7 @@ import re, gtk import terminatorlib.config +from terminatorlib.config import err class KeymapError(Exception): def __init__(self, value):