jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/632368 )
Change subject: [IMPR] Give a more informative assert message in package_versions ......................................................................
[IMPR] Give a more informative assert message in package_versions
Change-Id: Ibdde29f519c97fffe5d75909f334585a8ff6f727 --- M pywikibot/bot.py M pywikibot/version.py 2 files changed, 4 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 96ea8c4..f03ed48 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -387,9 +387,8 @@ if config.verbose_output: check_package_list += all_modules
- packages = version.package_versions(check_package_list) - log('PACKAGES:') + packages = version.package_versions(check_package_list) for name in sorted(packages.keys()): info = packages[name] info.setdefault('path', diff --git a/pywikibot/version.py b/pywikibot/version.py index 6e5557c..45a77d0 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -530,7 +530,9 @@ path = path[0:path.index('__init__.py')]
info['path'] = path - assert path not in paths, 'Path of the package is in defined paths' + assert path not in paths, \ + 'Path {} of the package {} is in defined paths as {}' \ + .format(path, name, paths[path]) paths[path] = name
if '__version__' in package.__dict__:
pywikibot-commits@lists.wikimedia.org