Merge "ASM #18276 Pypies repack functionality is broken in 16.1.1." into asm_16.1.1

Former-commit-id: 77f3e4741fe84322773742ed5121ed2c75a4d816
This commit is contained in:
Juliya Dynina 2015-11-04 14:58:08 -05:00 committed by Gerrit Code Review
commit e1090f6f58

View file

@ -804,9 +804,7 @@ class H5pyDataStore(IDataStore.IDataStore):
if outDir is None:
os.remove(filepath)
os.rename(repackedFullPath, filepath)
self.__doMakeReadable(filepath)
else :
self.__doMakeReadable(repackedFullPath)
os.chmod(filepath, stat.S_IWUSR | stat.S_IWGRP | stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
else:
# remove failed new file if there was one
if os.path.exists(repackedFullPath):
@ -815,7 +813,6 @@ class H5pyDataStore(IDataStore.IDataStore):
# repack failed, but they wanted the data in a different
# directory, so just copy the original data without the repack
shutil.copy(filepath, repackedFullPath)
self.__doMakeReadable(repackedFullPath)
t1=time.time()
if timeMap.has_key('repack'):
timeMap['repack']+=t1-t0