Fix two flake8 errors
This commit is contained in:
parent
b2b05cb81c
commit
417e823e96
|
@ -604,7 +604,7 @@ def check_segment_name(name, data, context, echoerr):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
echoerr(context='Error while loading segment function (key {key})'.format(key=context_key(context)),
|
echoerr(context='Error while loading segment function (key {key})'.format(key=context_key(context)),
|
||||||
problem='failed to load function {0} from module {1}'.format(name, module),
|
problem='failed to load function {0} from module {1}'.format(name, module),
|
||||||
problem_mark=match_name.mark)
|
problem_mark=name.mark)
|
||||||
return True, False, True
|
return True, False, True
|
||||||
|
|
||||||
if not callable(func):
|
if not callable(func):
|
||||||
|
|
|
@ -88,7 +88,6 @@ class Reader(object):
|
||||||
def check_printable(self, data):
|
def check_printable(self, data):
|
||||||
match = NON_PRINTABLE.search(data)
|
match = NON_PRINTABLE.search(data)
|
||||||
if match:
|
if match:
|
||||||
character = match.group()
|
|
||||||
self.update_pointer(match.start())
|
self.update_pointer(match.start())
|
||||||
raise ReaderError('while reading from stream', None,
|
raise ReaderError('while reading from stream', None,
|
||||||
'found special characters which are not allowed',
|
'found special characters which are not allowed',
|
||||||
|
|
Loading…
Reference in New Issue