distname in __pkginfo__.py is optional (closes #2192271)
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 08 Mar 2012 10:03:44 +0100
changeset 817 9354b68df5ad
parent 816 608d6e52a4d7
child 818 e5d79091fd48
distname in __pkginfo__.py is optional (closes #2192271) Default to the value of modname. This should let rql tests pass.
_apycotlib/checkers/python.py
--- a/_apycotlib/checkers/python.py	Thu Mar 08 10:03:44 2012 +0100
+++ b/_apycotlib/checkers/python.py	Thu Mar 08 10:03:44 2012 +0100
@@ -56,7 +56,7 @@
         from logilab.devtools.lib.pkginfo import PackageInfo
         pkginfo = PackageInfo(directory=test.project_path())
         modname = getattr(pkginfo, 'modname', None)
-        distname = getattr(pkginfo, 'distname', None)
+        distname = getattr(pkginfo, 'distname', modname)
         package = getattr(pkginfo, 'subpackage_of', None)
         if modname and package:
             modname = '%s.%s' % (package, modname)