yum-2.3.0-1: global name 'repoid' is not defined in repos.py line 103

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After upgrading to yum-2.3.0-1 on Feb 22nd, I always get

>yum search foo                                 
Traceback (most recent call last):
  File "/usr/bin/yum", line 7, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 51, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 151, in getOptionsConfig
    self.doConfigSetup(fn = conffile, root = root)
  File "__init__.py", line 70, in doConfigSetup
  File "__init__.py", line 121, in getReposFromConfig
  File "repos.py", line 103, in add
NameError: global name 'repoid' is not defined

with all yum commands.


FWIW, I (blindly) cooked up this

--8<-----------------------------------------------------------------------
--- /usr/lib/python2.4/site-packages/yum/repos.py~      2005-02-25 09:35:13.000000000 +0200
+++ /usr/lib/python2.4/site-packages/yum/repos.py       2005-02-25 09:35:13.000000000 +0200
@@ -100,7 +100,7 @@
 
     def add(self, repoobj):
         if self.repos.has_key(repoobj.id):
-            raise Errors.RepoError, 'Repository %s already added, not adding again' % (repoid)
+            raise Errors.RepoError, 'Repository %s already added, not adding again' % (repoobj.id)
         self.repos[repoobj.id] = repoobj
         
 
@@ -118,7 +118,7 @@
             return self.repos[repoid]
         except KeyError, e:
             raise Errors.RepoError, \
-                'Error getting repository data for %s, repository not found' % (repoid)
+                'Error getting repository data for %s, repository not found' % (repoobj.id)
 
     def disableRepo(self, repoid):
         """disable a repository from use"""
--8<-----------------------------------------------------------------------


And it appears to help.



-- v -- 

v@xxxxxx


[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]