Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549590 - app-portage/layman - File "/usr/lib64/python3.4/site-packages/layman/api.py", line 197, in disable_repos result.append(False) NameError: name 'result' is not defined
Summary: app-portage/layman - File "/usr/lib64/python3.4/site-packages/layman/api.py",...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-05-15 19:35 UTC by Blu3
Modified: 2016-05-10 04:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blu3 2015-05-15 19:35:18 UTC
# layman -D science

 * Disabling selected overlay(s),...
 * Warning: an installed db file was not found at: ['/var/lib/layman/cache_930c3ed4a5f89f74fd810585751a06e3.xml']
 * Exception: Overlay "science" does not exist.
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/layman", line 45, in <module>
    main()
  File "/usr/lib64/python3.4/site-packages/layman/cli.py", line 197, in __call__
    result += getattr(self, action[1])()
  File "/usr/lib64/python3.4/site-packages/layman/cli.py", line 315, in Disable
    result = self.api.disable_repos(selection)
  File "/usr/lib64/python3.4/site-packages/layman/api.py", line 197, in disable_repos
    result.append(False)
NameError: name 'result' is not defined


should be "results", not "result" at line 197

Reproducible: Always




# diff -ruN /usr/lib64/python3.4/site-packages/layman/api.py~ /usr/lib64/python3.4/site-packages/layman/api.py
--- /usr/lib64/python3.4/site-packages/layman/api.py~   2014-11-13 12:38:26.000000000 -0500
+++ /usr/lib64/python3.4/site-packages/layman/api.py    2015-05-11 15:05:25.684921936 -0400
@@ -194,7 +194,7 @@
         for ovl in repos:
             if not self.is_repo(ovl):
                 self.output.error(UnknownOverlayMessage(ovl))
-                result.append(False)
+                results.append(False)
                 continue
             success = False
             try:
Comment 1 Devan Franchini (RETIRED) gentoo-dev 2015-09-29 00:41:55 UTC
Not sure if this has been acknowledged anywhere else (I fixed this awhile ago and I could've sworn I saw an issue on it in GitHub) but the issue is resolved in 9999 versions of layman and will be fixed in the next release.

Thank you for submitting the bug report!
Comment 2 Devan Franchini (RETIRED) gentoo-dev 2016-05-10 04:45:19 UTC
2.4.1 is out which resolves this issue, therefore, I'm resolving the bug.