actions: Handle OSErrors when listing action configs.
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 10 Jun 2010 06:54:42 +0000 (08:54 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Thu, 10 Jun 2010 06:54:42 +0000 (08:54 +0200)
src/lib/backupninja/action.py

index 1ebc737..66fc5f3 100644 (file)
@@ -33,7 +33,12 @@ def run_all_actions(opts, global_config):
     opts are the parsed commandline options, global_config is the parsed
     global configuration.
     """
-    actions = config.list_actions(opts)
+    try:
+        actions = config.list_actions(opts)
+    except OSError, e:
+        log.critical('Unable to list actions: %s', e)
+        return
+
     actions.sort()
 
     for action in actions: