From 653874458527a82cacf5af27507b4cc617368c8a Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Wed, 19 Sep 2012 15:59:58 +0800 Subject: [PATCH] Prevent exception when --run is not specified for create and install --- moodle-create.py | 3 ++- moodle-install.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/moodle-create.py b/moodle-create.py index 57c2f9b..cd05f3f 100755 --- a/moodle-create.py +++ b/moodle-create.py @@ -98,7 +98,8 @@ if args.install: } M.install(**kwargs) - if M.isInstalled(): + # Running scripts + if M.isInstalled() and type(args.run) == list: for script in args.run: debug('Running script \'%s\'' % (script)) try: diff --git a/moodle-install.py b/moodle-install.py index 1d51878..cfe7c6f 100755 --- a/moodle-install.py +++ b/moodle-install.py @@ -61,7 +61,8 @@ kwargs = { } M.install(**kwargs) -if M.isInstalled(): +# Running scripts +if M.isInstalled() and type(args.run) == list: for script in args.run: debug('Running script \'%s\'' % (script)) try: -- 2.11.0