[cli] convert, remove useless import.
This commit is contained in:
@ -1,8 +1,6 @@
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
import bonobo
|
import bonobo
|
||||||
from bonobo.commands.util.arguments import parse_variable_argument
|
from bonobo.commands.util.arguments import parse_variable_argument
|
||||||
|
|
||||||
@ -47,14 +45,13 @@ def resolve_factory(name, filename, factory_type, options=None):
|
|||||||
|
|
||||||
if options:
|
if options:
|
||||||
options = dict(map(parse_variable_argument, options))
|
options = dict(map(parse_variable_argument, options))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
options = dict()
|
options = dict()
|
||||||
|
|
||||||
if not name in REGISTRY:
|
if not name in REGISTRY:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
'Could not resolve {factory_type} factory for {filename} ({name}). Try providing it explicitely using -{opt} <format>.'.
|
'Could not resolve {factory_type} factory for {filename} ({name}). Try providing it explicitely using -{opt} <format>.'.
|
||||||
format(name=name, filename=filename, factory_type=factory_type, opt=factory_type[0])
|
format(name=name, filename=filename, factory_type=factory_type, opt=factory_type[0])
|
||||||
)
|
)
|
||||||
|
|
||||||
if factory_type == READER:
|
if factory_type == READER:
|
||||||
|
|||||||
Reference in New Issue
Block a user