mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Do not crash if dynamips config contain non ascii chars
But I don't know why user can want to do that. Fix #123
This commit is contained in:
1 parent
49f36a83bd
commit
990f243f15
1 file changed
+2
-2
@@ -560,8 +560,8 @@ class Dynamips(BaseManager):
|
||||
raise DynamipsError("Could not create Dynamips configs directory: {}".format(e))
|
||||
|
||||
try:
|
||||
with open(path, "w") as f:
|
||||
f.write(content)
|
||||
with open(path, "wb") as f:
|
||||
f.write(content.encode("utf-8"))
|
||||
except OSError as e:
|
||||
raise DynamipsError("Could not create config file {}: {}".format(path, e))
|
||||
|
||||
|
||||
Reference in new issue
Block a user