Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 549590

Summary: 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
Product: Portage Development Reporter: Blu3 <david+gentoo.org>
Component: ToolsAssignee: Layman Overlay Manager project <layman>
Status: RESOLVED FIXED    
Severity: normal CC: tools-portage, twitch153
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.