summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mic/imager/baseimager.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py
index 3762884..f33138e 100644
--- a/mic/imager/baseimager.py
+++ b/mic/imager/baseimager.py
@@ -1247,17 +1247,9 @@ class BaseImageCreator(object):
os.close(fd)
os.chmod(path, 0700)
- for item in os.listdir(self._imgdir):
- sub = os.path.splitext(item)[1]
- if sub == ".img":
- shutil.move(os.path.join(self._imgdir, item),
- os.path.join(self._instroot + "/tmp", item))
- oldoutdir = os.getcwd()
- os.chdir(self._instroot + "/tmp")
-
env = self._get_sign_scripts_env()
- #*.img files are moved to self._instroot + "/tmp" directory in running runscripts
- env['IMG_PATHS'] = env['IMG_PATHS'].replace(self._imgdir,self._instroot + "/tmp")
+ oldoutdir = os.getcwd()
+ os.chdir(self._imgdir)
try:
try:
p = subprocess.Popen([s.interp, path],
@@ -1275,9 +1267,6 @@ class BaseImageCreator(object):
finally:
os.chdir(oldoutdir)
os.unlink(path)
- for item in os.listdir(self._instroot + "/tmp"):
- shutil.move(os.path.join(self._instroot + "/tmp", item),
- os.path.join(self._imgdir, item))
def __run_post_scripts(self):
msger.info("Running post scripts ...")