From: Matthijs Kooijman Date: Thu, 10 Jun 2010 06:54:42 +0000 (+0200) Subject: actions: Handle OSErrors when listing action configs. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=75bf976607685eddaaab1d5239408b8f545ce158;p=matthijs%2Fprojects%2Fbackupninja.git actions: Handle OSErrors when listing action configs. --- diff --git a/src/lib/backupninja/action.py b/src/lib/backupninja/action.py index 1ebc737..66fc5f3 100644 --- a/src/lib/backupninja/action.py +++ b/src/lib/backupninja/action.py @@ -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: