diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-18 22:21:43 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-18 22:24:45 +0100 |
commit | 7bebb64fc4d58ee25c7f84d378aad4bd9065536c (patch) | |
tree | b1f5aafb908b95bbc08495498d4d4b22f62c3b77 /grc/base/Platform.py | |
parent | 20c71cb44a6f7500e64a8e9e394e9e1b372aa46d (diff) |
grc: fix connections error log and color
Diffstat (limited to 'grc/base/Platform.py')
-rw-r--r-- | grc/base/Platform.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/grc/base/Platform.py b/grc/base/Platform.py index 5fd86ba0f9..c5d03e2ffc 100644 --- a/grc/base/Platform.py +++ b/grc/base/Platform.py @@ -149,15 +149,14 @@ class Platform(_Element): to_bool = lambda s, d: d if s is None else \ s.lower() not in ('false', 'off', '0', '') - color_code = n.find('color') or '' + color = n.find('color') or '' try: import gtk # ugly, but handy - color = gtk.gdk.color_parse(color_code) + gtk.gdk.color_parse(color) except (ValueError, ImportError): - if color_code: # no color is okay - print >> sys.stderr, 'Warning: Can\'t parse color code "%s" ' \ - 'for domain "%s" ' % (key, str(color_code)) - color = None # default color set in gui + if color: # no color is okay + print >> sys.stderr, 'Warning: Can\'t parse color code "%s" for domain "%s" ' % (color, key) + color = None self._domains[key] = dict( name=n.find('name') or key, |