Prevent exception when --run is not specified for create and install
authorFrederic Massart <fred@moodle.com>
Wed, 19 Sep 2012 07:59:58 +0000 (15:59 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 19 Sep 2012 07:59:58 +0000 (15:59 +0800)
moodle-create.py
moodle-install.py

index 57c2f9b..cd05f3f 100755 (executable)
@@ -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:
index 1d51878..cfe7c6f 100755 (executable)
@@ -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: