diff options
-rw-r--r-- | lib/thandy/packagesys/ThpPackages.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/thandy/packagesys/ThpPackages.py b/lib/thandy/packagesys/ThpPackages.py index 8336091..af66b80 100644 --- a/lib/thandy/packagesys/ThpPackages.py +++ b/lib/thandy/packagesys/ThpPackages.py @@ -8,6 +8,7 @@ import time import shutil import subprocess import sys +import errno from lockfile import LockFile, AlreadyLocked, LockFailed @@ -248,7 +249,7 @@ class ThpInstaller(PS.Installer): logging.info("%s: Already exists, using it." % dir) for file in self._pkg.get('manifest'): - if file['is_config']: + if file['is_config'] and exists: logging.info("Ignoring file: %s" % file) else: logging.info("Processing file: %s" % file) @@ -261,7 +262,11 @@ class ThpInstaller(PS.Installer): pass if "/" in file["name"]: - os.makedirs("/".join([destPath] + file["name"].split("/")[:-1])) + try: + os.makedirs(os.path.join(*([destPath] + file["name"].split("/")[:-1]))) + except OSError, e: + if e.errno != errno.EEXIST: + raise e shutil.copy(os.path.join(self._pkg.getTmpPath(), "content", file['name']), os.path.join(destPath, file['name'])); |