Package: debpartial-mirror
Version: 0.2.93
Severity: normal
Tags: patch
The method Config.check_depencencies uses an inexistent variable
'section'. This makes debpartial-mirror crash with a NameError python
exception when some backend uses an inexistent backend in its
'resolve_dep_using' option.
[EMAIL PROTECTED]:~/hacking/src/debpartial-mirror/debpartial-mirror-0.2.93$
./debpartial-mirror -c mirror.conf all
Traceback (most recent call last):
File "./debpartial-mirror", line 246, in ?
main()
File "./debpartial-mirror", line 208, in main
(cnf_mirrors, cnf_merges) = cnf.get_backends()
File
"/home/terceiro/hacking/src/debpartial-mirror/debpartial-mirror-0.2.93/debpartial_mirror/Config.py",
line 342, in get_backends
self.check_dependencies(backend)
File
"/home/terceiro/hacking/src/debpartial-mirror/debpartial-mirror-0.2.93/debpartial_mirror/Config.py",
line 336, in check_dependencies
raise InvalidSection(section)
NameError: global name 'section' is not defined
The attached patch fixes the problem.
--
Antonio S. de A. Terceiro <[EMAIL PROTECTED]>
http://people.softwarelivre.org/~terceiro/
GnuPG ID: E6F73C30
Index: debpartial_mirror/Config.py
===================================================================
--- debpartial_mirror/Config.py (revisão 740)
+++ debpartial_mirror/Config.py (cópia de trabalho)
@@ -333,7 +333,7 @@
dependencies = self.get_dependencies(backend)
for dependency in dependencies:
if dependency not in self.backends.keys():
- raise InvalidSection(section)
+ raise InvalidSection(dependency)
def get_backends(self):