Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/copy-to-journal
diff options
context:
space:
mode:
Diffstat (limited to 'bin/copy-to-journal')
-rwxr-xr-xbin/copy-to-journal8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/copy-to-journal b/bin/copy-to-journal
index cf2cf20..d6ae6f3 100755
--- a/bin/copy-to-journal
+++ b/bin/copy-to-journal
@@ -11,6 +11,7 @@ import sys
import os
import optparse
from gettext import gettext as _
+import dbus
if os.path.exists("/tmp/olpc-session-bus"):
os.environ["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/tmp/olpc-session-bus"
@@ -88,5 +89,10 @@ if __name__ == "__main__":
entry.destroy()
+ except dbus.DBusException:
+ print 'ERROR: Unable to connect to the datastore.\n'\
+ 'Check that you are running in the same environment as the '\
+ 'datastore service.'
+
except Exception, e:
- print 'Error: %s' % (e)
+ print 'ERROR: %s' % (e)