mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Override manifest file only after it is fully written to disk.
We called "Override()" before closing the file passed in argument. Change-Id: I15adb99deb14297ef72fcb1b0945eb246f172fb0
This commit is contained in:
parent
5732e47ebb
commit
719965af35
@ -226,13 +226,13 @@ uncommitted changes are present' % project.relpath
|
|||||||
f = open(manifest_path, 'w')
|
f = open(manifest_path, 'w')
|
||||||
try:
|
try:
|
||||||
f.write(manifest_str)
|
f.write(manifest_str)
|
||||||
self.manifest.Override(manifest_name)
|
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
print >>sys.stderr, 'error: cannot write manifest to %s' % \
|
print >>sys.stderr, 'error: cannot write manifest to %s' % \
|
||||||
manifest_path
|
manifest_path
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
self.manifest.Override(manifest_name)
|
||||||
else:
|
else:
|
||||||
print >>sys.stderr, 'error: %s' % manifest_str
|
print >>sys.stderr, 'error: %s' % manifest_str
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user