mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-24 06:56:42 +00:00
Do not compute checksums on macOS
This commit is contained in:
parent
8eb5f10971
commit
1d86e322e9
@ -77,13 +77,11 @@ def main():
|
|||||||
Entry point for GNS3 server
|
Entry point for GNS3 server
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if hasattr(sys, "frozen"):
|
|
||||||
multiprocessing.freeze_support()
|
|
||||||
multiprocessing.set_start_method("spawn")
|
|
||||||
|
|
||||||
if not sys.platform.startswith("win"):
|
if not sys.platform.startswith("win"):
|
||||||
if "--daemon" in sys.argv:
|
if "--daemon" in sys.argv:
|
||||||
daemonize()
|
daemonize()
|
||||||
|
else:
|
||||||
|
multiprocessing.freeze_support()
|
||||||
|
|
||||||
from gns3server.run import run
|
from gns3server.run import run
|
||||||
run()
|
run()
|
||||||
|
@ -29,7 +29,6 @@ import functools
|
|||||||
import time
|
import time
|
||||||
import atexit
|
import atexit
|
||||||
import weakref
|
import weakref
|
||||||
import concurrent.futures
|
|
||||||
|
|
||||||
# Import encoding now, to avoid implicit import later.
|
# Import encoding now, to avoid implicit import later.
|
||||||
# Implicit import within threads may cause LookupError when standard library is in a ZIP
|
# Implicit import within threads may cause LookupError when standard library is in a ZIP
|
||||||
@ -238,7 +237,11 @@ class WebServer:
|
|||||||
Compute image checksums.
|
Compute image checksums.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if sys.platform.startswith("darwin") and hasattr(sys, "frozen"):
|
||||||
|
# do not compute on macOS because errors
|
||||||
|
return
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
import concurrent.futures
|
||||||
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
|
with concurrent.futures.ProcessPoolExecutor(max_workers=1) as pool:
|
||||||
try:
|
try:
|
||||||
log.info("Computing image checksums...")
|
log.info("Computing image checksums...")
|
||||||
|
Loading…
Reference in New Issue
Block a user