[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at 46d71354a6b4b3410aed4e9683401833241280ca

Adrian Likins alikins at redhat.com
Tue Jun 5 16:27:18 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  46d71354a6b4b3410aed4e9683401833241280ca (commit)
      from  9bce97e7028fa6db18e3c5980251498f20245b0e (commit)

- Log -----------------------------------------------------------------
commit 46d71354a6b4b3410aed4e9683401833241280ca
Author: Adrian Likins <alikins at grimlock.devel.redhat.com>
Date:   Tue Jun 5 12:20:07 2007 -0400

    make this compile
-----------------------------------------------------------------------

Diffstat:
 service/db_upgrade/db_upgrade.py |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/service/db_upgrade/db_upgrade.py b/service/db_upgrade/db_upgrade.py
index 7ca0400..559c7ba 100644
--- a/service/db_upgrade/db_upgrade.py
+++ b/service/db_upgrade/db_upgrade.py
@@ -71,7 +71,7 @@ class Upgrade(object):
                 if (pymatch and (numfiles > 1)):
                     raise ValueError("invalid upgrade files specified for version " + str(version) + "Only one script allowed for python upgrades.")
                 sqlmatch = re.search('-(\w+)-((up|down)grade).sql$', filename)
-                if (not (pymatch or sqlmatch):
+                if (not (pymatch or sqlmatch)):
                     raise ValueError("invalid upgrade files specified for version " + str(version) + "script " + filename + " must be a python file or a sqlfile in the form upgradename-dbname-(up|down)grade.sql")
 
             self.versions[version] = section
@@ -104,9 +104,9 @@ class Upgrade(object):
 
         if (fs_version > db_version):
             print "upgrading to version ", fs_version
-            output = self.migrate_cmd("upgrade", [self.dbpath, REPOSITORY, version]))
+            output = self.migrate_cmd("upgrade", [self.dbpath, REPOSITORY, version])
 
-    def commit_versions(self, test_first)
+    def commit_versions(self, test_first):
         fs_version = self.get_installed_schema_version()
         repo_version = self.get_repository_schema_version()
 
@@ -122,10 +122,10 @@ class Upgrade(object):
                     shutil.copy(filename, tmpfilename)
                     if pymatch:
                         if test_first:
-                            output = self.migrate_cmd("test", [tmpfilename, REPOSITORY, self.dbpath]))
-                        output = self.migrate_cmd("commit", [tmpfilename, REPOSITORY, version]))
+                            output = self.migrate_cmd("test", [tmpfilename, REPOSITORY, self.dbpath])
+                        output = self.migrate_cmd("commit", [tmpfilename, REPOSITORY, version])
                     elif sqlmatch:
-                        output = self.migrate_cmd("commit", [tmpfilename, REPOSITORY, sqlmatch.group(1), sqlmatch.group(2), version]))
+                        output = self.migrate_cmd("commit", [tmpfilename, REPOSITORY, sqlmatch.group(1), sqlmatch.group(2), version])
 
     def initialize_schema_version(self):
         """
@@ -134,11 +134,11 @@ class Upgrade(object):
         """
 
         # create a new repository
-        self.migrate_cmd("create", [REPOSITORY, "virt-factory repository"]))
+        self.migrate_cmd("create", [REPOSITORY, "virt-factory repository"])
         # add upgrade scripts to repo
         self.commit_versions(false)
         # add the database
-        self.migrate_cmd("version_control", [self.dbpath, REPOSITORY, str(self.get_loaded_schema_version())]))
+        self.migrate_cmd("version_control", [self.dbpath, REPOSITORY, str(self.get_loaded_schema_version())])
 
     def migrate_cmd(self, command, args):
         """
@@ -153,7 +153,7 @@ class Upgrade(object):
         cmd_output = pipe.stdout.read().strip()
         error_msg = pipe.stderr.read().strip()
         exitCode = pipe.wait()
-        if (len(error_msg > 0) or exitCode != 0
+        if (len(error_msg > 0) or exitCode != 0):
             self.logger.error("error in running " + cmdline)
             self.logger.error(error_msg)
             raise Exception(error_msg)

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  9bce97e7028fa6db18e3c5980251498f20245b0e \
  46d71354a6b4b3410aed4e9683401833241280ca




More information about the Et-mgmt-commits-list mailing list