mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 14:51:13 +02:00
Make sure we don't try to read when opening a file in binary more. Fixes #1301.
This commit is contained in:
1 parent
419797dd92
commit
c93d0d8d12
8 files changed
+36
-26
No files matched your search
@@ -348,14 +348,14 @@ class IOUVM(BaseNode):
|
||||
# reload
|
||||
path = os.path.join(os.path.expanduser("~/"), ".iourc")
|
||||
try:
|
||||
with open(path, "wb+") as f:
|
||||
with open(path, "wb") as f:
|
||||
f.write(value.encode("utf-8"))
|
||||
except OSError as e:
|
||||
raise IOUError("Could not write the iourc file {}: {}".format(path, e))
|
||||
|
||||
path = os.path.join(self.temporary_directory, "iourc")
|
||||
try:
|
||||
with open(path, "wb+") as f:
|
||||
with open(path, "wb") as f:
|
||||
f.write(value.encode("utf-8"))
|
||||
except OSError as e:
|
||||
raise IOUError("Could not write the iourc file {}: {}".format(path, e))
|
||||
|
||||
Reference in new issue
Block a user