From c6f68f96f235a84e10c57e921b092e3a3fb29e38 Mon Sep 17 00:00:00 2001 From: Christoph Goehre Date: Sun, 6 Apr 2008 17:26:17 +0200 Subject: fix crash in hash generation for Release file If mini-dinstall realise there is no child processes from the external program, it should inform the logger and go on. But I forget to add the self statement before the logger and so it crashed down. Apr 04 15:12:49 mini-dinstall [-1358341200] ERROR: Unhandled exception; shutting down Traceback (most recent call last): File "/usr/bin/mini-dinstall", line 1165, in run self._gen_release_all(True) File "/usr/bin/mini-dinstall", line 1158, in _gen_release_all self._gen_release(self._arches, force) File "/usr/bin/mini-dinstall", line 1249, in _gen_release self._gen_release_impl(self._arches, force) File "/usr/bin/mini-dinstall", line 1344, in _gen_release_impl self._do_hash(hash, indexfiles, f) File "/usr/bin/mini-dinstall", line 1150, in _do_hash h = self._get_file_sum(hash, absfile) File "/usr/bin/mini-dinstall", line 1133, in _get_file_sum ret = misc.get_file_sum(self, type, filename) File "/usr/lib/python2.3/site-packages/minidinstall/misc.py", line 51, in get_file_sum ret = _get_external_file_sum(self, type, filename) File "/usr/lib/python2.3/site-packages/minidinstall/misc.py", line 93, in _get_external_file_sum logger.warn("Ignoring missing child proccess") NameError: global name 'logger' is not defined --- minidinstall/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minidinstall/misc.py b/minidinstall/misc.py index a3c9489..a942adc 100644 --- a/minidinstall/misc.py +++ b/minidinstall/misc.py @@ -90,7 +90,7 @@ def _get_external_file_sum(self, type, filename): status = child.wait() except OSError, (errnum, err): if errnum == 10: - logger.warn("Ignoring missing child proccess") + self._logger.warn("Ignoring missing child proccess") status = 0 if not (status is None or (os.WIFEXITED(status) and os.WEXITSTATUS(status) == 0)): if os.WIFEXITED(status): -- cgit v1.2.3