Update -u does not upgrade is instance is not installed
authorFrederic Massart <fred@moodle.com>
Thu, 16 Aug 2012 09:00:14 +0000 (17:00 +0800)
committerFrederic Massart <fred@moodle.com>
Thu, 16 Aug 2012 09:00:14 +0000 (17:00 +0800)
moodle-update.py

index 56bd5d4..ef498e6 100755 (executable)
@@ -63,7 +63,7 @@ for M in Mlist:
        debug('Updating %s...' % M.get('identifier'))
        try:
                M.update()
-               if args.upgrade:
+               if M.isInstalled() and args.upgrade:
                        M.upgrade()
        except Exception as e:
                debug('Error during the update of %s' % M.get('identifier'))