Fix minor issues

This commit is contained in:
Julien Duponchelle 2015-11-09 12:32:36 +01:00
parent da240f21ba
commit ac16ee5bc6
4 changed files with 3 additions and 12 deletions

View File

@ -217,7 +217,7 @@ class ProjectHandler:
response.write(("{}\n".format(msg)).encode("utf-8"))
except asyncio.futures.CancelledError as e:
break
except asyncio.futures.TimeoutError as e:
except asyncio.futures.TimeoutError:
response.write("{\"action\": \"ping\"}\n".encode("utf-8"))
project.stop_listen_queue(queue)
if project.id in ProjectHandler._notifications_listening:

View File

@ -104,15 +104,6 @@ class UploadHandler:
def backup_images(request, response):
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
def _restore_directory(file, directory):
"""

View File

@ -173,7 +173,7 @@ def pid_lock(path):
with open(path, 'w+') as f:
f.write(str(os.getpid()))
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)

View File

@ -6,7 +6,7 @@ commands = python setup.py test
deps = -rdev-requirements.txt
[pep8]
ignore = E501,E402
ignore = E501,E402,E265
[flake8]
ignore = E265,E501