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],
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 ...")