mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Some code cleanup
This commit is contained in:
1 parent
c9314ec509
commit
89b7d62ec6
1 file changed
+2
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user