1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Apply pep8 fix

This commit is contained in:
Julien Duponchelle 2015-11-09 12:28:00 +01:00
parent f01a6dcaaf
commit da240f21ba
14 changed files with 54 additions and 51 deletions

View File

@ -57,4 +57,3 @@ class FileHandler:
raise aiohttp.web.HTTPNotFound()
except OSError as e:
raise aiohttp.web.HTTPConflict(text=str(e))

View File

@ -16,7 +16,9 @@
from ..web.route import Route
class IndexHandler:
@classmethod
@Route.get(
r"/",

View File

@ -44,6 +44,7 @@ class Container(BaseVM):
:param manager: Manager instance
:param image: Docker image
"""
def __init__(self, name, vm_id, project, manager, image, startcmd=None):
self._name = name
self._id = vm_id

View File

@ -21,6 +21,7 @@ import hashlib
import logging
log = logging.getLogger(__name__)
def md5sum(path):
"""
Return the md5sum of an image and cache it on disk

View File

@ -104,6 +104,7 @@ def test_upload_previous_checksum(server, tmpdir):
checksum = f.read()
assert checksum == "ae187e1febee2a150b64849c32d566ca"
def test_upload_images_backup(server, tmpdir):
Config.instance().set("Server", "images_path", str(tmpdir / 'images'))
os.makedirs(str(tmpdir / 'images' / 'IOU'))

View File

@ -242,7 +242,6 @@ def test_set_qemu_path_environ(vm, tmpdir, fake_qemu_binary):
assert vm.platform == "x86_64"
def test_set_qemu_path_windows(vm, tmpdir):
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64w.EXE")
@ -255,7 +254,6 @@ def test_set_qemu_path_windows(vm, tmpdir):
assert vm.platform == "x86_64"
@pytest.mark.skipif(sys.platform.startswith("linux") is False, reason="Supported only on linux")
def test_set_qemu_path_kvm_binary(vm, tmpdir, fake_qemu_binary):

View File

@ -93,6 +93,7 @@ def parse_vmnet_range(start, end):
"""
class Range(argparse.Action):
def __call__(self, parser, args, values, option_string=None):
if len(values) != 2:
raise argparse.ArgumentTypeError("vmnet range must consist of 2 numbers")