mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-01 11:40:56 +00:00
Fix minor issues
This commit is contained in:
parent
da240f21ba
commit
ac16ee5bc6
@ -217,7 +217,7 @@ class ProjectHandler:
|
|||||||
response.write(("{}\n".format(msg)).encode("utf-8"))
|
response.write(("{}\n".format(msg)).encode("utf-8"))
|
||||||
except asyncio.futures.CancelledError as e:
|
except asyncio.futures.CancelledError as e:
|
||||||
break
|
break
|
||||||
except asyncio.futures.TimeoutError as e:
|
except asyncio.futures.TimeoutError:
|
||||||
response.write("{\"action\": \"ping\"}\n".encode("utf-8"))
|
response.write("{\"action\": \"ping\"}\n".encode("utf-8"))
|
||||||
project.stop_listen_queue(queue)
|
project.stop_listen_queue(queue)
|
||||||
if project.id in ProjectHandler._notifications_listening:
|
if project.id in ProjectHandler._notifications_listening:
|
||||||
|
@ -104,15 +104,6 @@ class UploadHandler:
|
|||||||
def backup_images(request, response):
|
def backup_images(request, response):
|
||||||
yield from UploadHandler._backup_directory(request, response, UploadHandler.image_directory())
|
yield from UploadHandler._backup_directory(request, response, UploadHandler.image_directory())
|
||||||
|
|
||||||
@classmethod
|
|
||||||
@Route.get(
|
|
||||||
r"/backup/projects.tar",
|
|
||||||
description="Backup GNS3 projects",
|
|
||||||
api_version=None
|
|
||||||
)
|
|
||||||
def backup_images(request, response):
|
|
||||||
yield from UploadHandler._backup_directory(request, response, UploadHandler.project_directory())
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _restore_directory(file, directory):
|
def _restore_directory(file, directory):
|
||||||
"""
|
"""
|
||||||
|
@ -173,7 +173,7 @@ def pid_lock(path):
|
|||||||
with open(path, 'w+') as f:
|
with open(path, 'w+') as f:
|
||||||
f.write(str(os.getpid()))
|
f.write(str(os.getpid()))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
log.critical("Can't write pid file %s: %s", args.pid, str(e))
|
log.critical("Can't write pid file %s: %s", path, str(e))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user