[jhbuild] bot: Move packagedb only if top_builddir exists (it doesn't on build masters)



commit cbbea64ac930b48945c63723b54e98a3b48b1512
Author: FrÃdÃric PÃters <fpeters 0d be>
Date:   Tue Jul 19 13:26:01 2011 +0200

    bot: Move packagedb only if top_builddir exists (it doesn't on build masters)

 jhbuild/moduleset.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index cfdf620..36025d4 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -55,7 +55,7 @@ class ModuleSet:
 
         legacy_pkgdb_path = os.path.join(self.config.prefix, 'share', 'jhbuild', 'packagedb.xml')
         new_pkgdb_path = os.path.join(self.config.top_builddir, 'packagedb.xml')
-        if os.path.isfile(legacy_pkgdb_path):
+        if os.path.exists(self.config.top_builddir) and os.path.isfile(legacy_pkgdb_path):
             os.rename(legacy_pkgdb_path, new_pkgdb_path)
 
         self.packagedb = packagedb.PackageDB(new_pkgdb_path, config)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]