mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-25 16:28:11 +00:00
parent
3bc4e951b8
commit
8dd4f63aca
@ -326,6 +326,15 @@ class IOUVM(BaseNode):
|
||||
def iourc_content(self, value):
|
||||
|
||||
if value is not None:
|
||||
# If we don't save the value in the ~/ the licence is lost at project
|
||||
# reload
|
||||
path = os.path.join(os.path.expanduser("~/"), ".iourc")
|
||||
try:
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user