[gnoduino] Bug 667501 - gnoduino doesn't start when preferences.txt is missing
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino] Bug 667501 - gnoduino doesn't start when preferences.txt is missing
- Date: Mon, 9 Jan 2012 01:13:17 +0000 (UTC)
commit b6134fe344d49df6b4a4e3813f337a82330e2661
Author: Lucian Langa <lucilanga gnome org>
Date: Mon Jan 9 02:11:33 2012 +0100
Bug 667501 - gnoduino doesn't start when preferences.txt is missing
src/prefs.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/prefs.py b/src/prefs.py
index cd95b7e..dc9c237 100644
--- a/src/prefs.py
+++ b/src/prefs.py
@@ -19,6 +19,7 @@
import os
import sys
import gconf
+import glib
import gettext
_ = gettext.gettext
@@ -63,7 +64,9 @@ class preferences(object):
if i[2] is 'int':
val = client.get_int(i[1])
if i[2] is 'string':
- val = client.get_string(i[1])
+ try:
+ val = client.get_string(i[1])
+ except glib.GError: None
if val is not None and val is not 0:
self.defaults.append([i[0], val])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]