Do not perform upgrade on older versions
authorFrederic Massart <fred@moodle.com>
Mon, 3 Sep 2012 08:26:21 +0000 (16:26 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 3 Sep 2012 08:26:21 +0000 (16:26 +0800)
moodle-update.py

index ef498e6..11f36a1 100755 (executable)
@@ -63,7 +63,7 @@ for M in Mlist:
        debug('Updating %s...' % M.get('identifier'))
        try:
                M.update()
-               if M.isInstalled() and args.upgrade:
+               if M.isInstalled() and args.upgrade and M.get('branch') != 'master' and int(M.get('branch')) < 20:
                        M.upgrade()
        except Exception as e:
                debug('Error during the update of %s' % M.get('identifier'))