Fix pylint messages
This commit is contained in:
parent
b6b30d7c82
commit
3831665da4
|
@ -47,8 +47,8 @@ class Config(object):
|
|||
|
||||
try:
|
||||
if isinstance(config_path, str):
|
||||
with open(config_path, 'rb') as f:
|
||||
config = yaml.safe_load(f)
|
||||
with open(config_path, 'rb') as config_file:
|
||||
config = yaml.safe_load(config_file)
|
||||
else:
|
||||
config = yaml.safe_load(config_path)
|
||||
except EnvironmentError:
|
||||
|
@ -63,9 +63,11 @@ class Config(object):
|
|||
self._printer_name = self._printer_config.pop('type').title()
|
||||
|
||||
if not self._printer_name or not hasattr(printer, self._printer_name):
|
||||
raise exceptions.ConfigSyntaxError('Printer type "{printer_name}" is invalid'.format(
|
||||
raise exceptions.ConfigSyntaxError(
|
||||
'Printer type "{printer_name}" is invalid'.format(
|
||||
printer_name=self._printer_name,
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
self._has_loaded = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue