"Local" command line parameter is only for stopping

a server that has been started by the desktop GUI
This commit is contained in:
grossmj committed 2022-03-30 18:38:34 +08:00
1 parent 8975f63e2f
commit 900d4f79ee
18 files changed
+138 -186

No files matched your search

+2 -6
View File
@@ -85,10 +85,6 @@ class Project:
"variables": self._variables
}
def is_local(self):
return Config.instance().settings.Server.local
@property
def id(self):
@@ -101,12 +97,12 @@ class Project:
@path.setter
def path(self, path):
check_path_allowed(path)
if hasattr(self, "_path"):
if path != self._path and self.is_local() is False:
if path != self._path:
raise ComputeForbiddenError("Changing the project directory path is not allowed")
check_path_allowed(path)
self._path = path
@property
+1
View File
@@ -267,6 +267,7 @@ class Qemu(BaseManager):
command.append(path)
command.append(f"{img_size}M")
print(command)
process = await asyncio.create_subprocess_exec(*command)
await process.wait()
except (OSError, subprocess.SubprocessError) as e: