1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-02-17 18:42:00 +00:00

Some code cleanup

This commit is contained in:
Julien Duponchelle 2015-02-23 17:28:17 +01:00
parent c9314ec509
commit 89b7d62ec6

View File

@ -55,8 +55,8 @@ class UploadHandler:
try:
os.makedirs(UploadHandler.image_directory(), exist_ok=True)
with open(destination_path, "wb+") as f:
f.write(data["file"].file.read())
print(destination_path)
chunk = data["file"].file.read()
f.write(chunk)
st = os.stat(destination_path)
os.chmod(destination_path, st.st_mode | stat.S_IXUSR)
except OSError as e: