aboutsummaryrefslogtreecommitdiff
path: root/ipsutils/tasks.py
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2013-06-09 20:19:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2013-06-09 20:19:52 -0400
commit4ffeb6eabe07978c16bc952b54256186f6bed2a9 (patch)
tree53be3b6275c62f3203af1337974f46c6a34b8080 /ipsutils/tasks.py
parent17bda7d30a791f843d5d6279f5a95e665b2387ca (diff)
downloadipsutils-4ffeb6eabe07978c16bc952b54256186f6bed2a9.tar.gz
Enforce file buffer flushing
Diffstat (limited to 'ipsutils/tasks.py')
-rw-r--r--ipsutils/tasks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipsutils/tasks.py b/ipsutils/tasks.py
index d376f38..4f7127b 100644
--- a/ipsutils/tasks.py
+++ b/ipsutils/tasks.py
@@ -106,6 +106,7 @@ class Dependencies(task.Task):
fp = file(self.cls.env_meta['STAGE3'], 'w+')
proc_pkg = subprocess.Popen(command_pkg, stdout=fp)
err = proc_pkg.wait()
+ fp.flush()
fp.close()
if err <= 1:
err = 0
@@ -134,6 +135,7 @@ class Transmogrify(task.Task):
for line in self.cls.script_dict['transforms']:
fp.writelines(string.join(line))
fp.writelines('\n')
+ fp.flush()
fp.close()
fp = file(self.cls.env_meta['STAGE1_PASS2'], 'w+')
@@ -157,6 +159,7 @@ class Manifest(task.Task):
fp = file(self.cls.env_meta['STAGE1'], 'a')
proc_pkg = subprocess.Popen(command_pkg, stdout=fp)
err = proc_pkg.wait()
+ fp.flush()
fp.close()
return err
@@ -408,6 +411,7 @@ class AlignPermissions(task.Internal):
else:
found = False
line_number += 1
+ outfile.flush()
infile.close()
shutil.copyfile(outfile.name, self.filename)