Merge branch 'master' into develop

This commit is contained in:
Romain Dorgueil
2018-08-11 15:04:35 +02:00
45 changed files with 257 additions and 205 deletions

View File

@ -26,7 +26,9 @@ def entrypoint(args=None):
commands = {}
def register_extension(ext, commands=commands):
def register_extension(ext):
nonlocal commands
try:
parser = subparsers.add_parser(ext.name)
if isinstance(ext.plugin, type) and issubclass(ext.plugin, BaseCommand):

View File

@ -33,9 +33,9 @@ class InitCommand(BaseCommand):
self.logger.info("Generated {} using template {!r}.".format(filename, template_name))
def create_package(self, *, filename):
name, ext = os.path.splitext(filename)
if ext != "":
raise ValueError("Package names should not have an extension.")
_, ext = os.path.splitext(filename)
if ext != '':
raise ValueError('Package names should not have an extension.')
try:
import medikit.commands