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 1ebc737cfdd76c7b0c176f175659128fd87e7a32..66fc5f364830f5b5221db05e44eab691a6115534 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: