mirror of
https://github.com/GNS3/gns3-server
synced 2025-02-20 12:02:03 +00:00
parent
3bc4e951b8
commit
8dd4f63aca
@ -326,6 +326,15 @@ class IOUVM(BaseNode):
|
|||||||
def iourc_content(self, value):
|
def iourc_content(self, value):
|
||||||
|
|
||||||
if value is not None:
|
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")
|
path = os.path.join(self.temporary_directory, "iourc")
|
||||||
try:
|
try:
|
||||||
with open(path, "wb+") as f:
|
with open(path, "wb+") as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user