don't shadow the global

This commit is contained in:
Jean-Paul Calderone 2020-12-12 18:21:35 -05:00
parent 692285ada3
commit 25c98d7421

View File

@ -137,12 +137,12 @@ class DaemonizeTheRealService(Service, HookMixin):
except KeyError: except KeyError:
raise ValueError("unknown nodetype %s" % self.nodetype) raise ValueError("unknown nodetype %s" % self.nodetype)
def handle_config_error(fail): def handle_config_error(reason):
if fail.check(UnknownConfigError): if reason.check(UnknownConfigError):
self.stderr.write("\nConfiguration error:\n{}\n\n".format(fail.value)) self.stderr.write("\nConfiguration error:\n{}\n\n".format(reason.value))
else: else:
self.stderr.write("\nUnknown error\n") self.stderr.write("\nUnknown error\n")
fail.printTraceback(self.stderr) reason.printTraceback(self.stderr)
reactor.stop() reactor.stop()
d = service_factory() d = service_factory()