[yum-commits] Branch 'yum-3_2_X' - 4 commits - test/yum-pylintrc yum/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Aug 28 18:06:28 UTC 2009
test/yum-pylintrc | 4 ++--
yum/__init__.py | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit eb5b4aaaa8904f6adf95c6a97e8a9140826e4cda
Merge: 745694a... 5676615...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Aug 28 14:06:24 2009 -0400
Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
* 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
Don't accidentally exit 1, when someone asks to update a non-existant pkg
commit 745694afc6deb01d565dbf70e226958eaf05d30e
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Aug 28 11:40:40 2009 -0400
stupid pylint errorcodes changing
grumble
diff --git a/test/yum-pylintrc b/test/yum-pylintrc
index f7aee50..bb9339a 100644
--- a/test/yum-pylintrc
+++ b/test/yum-pylintrc
@@ -80,9 +80,9 @@ disable-msg-cat=C,R
# W1001: *Use of "property" on an old style class*
# W0221: *Arguments number differs from %s method*
# W0703: *Catch "Exception"*
-# W1010: *Exception doesn't inherit from standard "Exception" class* (give false positives on ex. KeyboardInterrupt)
+# W0710: *Exception doesn't inherit from standard "Exception" class* (give false positives on ex. KeyboardInterrupt)
# W0631: *Using possibly undefined loop variable %r* (Gives to many false positives)
-disable-msg=E1101,F0401,W0704,W0612,W0212,W0613,W0602,W0511,W0401,W0614,W0232,W0201,W0603,W0621,W0142,W0102,W0105,W0702,W0231,E0202,W0622,W0403,W0223,W0104,W1001,W0221,W0703,W1010,W0631
+disable-msg=E1101,F0401,W0704,W0612,W0212,W0613,W0602,W0511,W0401,W0614,W0232,W0201,W0603,W0621,W0142,W0102,W0105,W0702,W0231,E0202,W0622,W0403,W0223,W0104,W1001,W0221,W0703,W0710,W0631
[REPORTS]
commit dce91a8c36d10be8b4242e0bce7369f55121b2f5
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Aug 28 11:21:58 2009 -0400
avoid the code duplication and just do it once
fix up to last patch
diff --git a/yum/__init__.py b/yum/__init__.py
index b395457..6df305e 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2395,19 +2395,20 @@ class YumBase(depsolve.Depsolve):
"""Pass in a generic [build]require string and this function will
pass back the best(or first) package it finds providing that dep."""
+ # we get all sorts of randomness here
+ errstring = depstring
+ if type(depstring) not in types.StringTypes:
+ errtring = str(depstring)
+
try:
pkglist = self.returnPackagesByDep(depstring)
except Errors.YumBaseError:
- if type(depstring) not in types.StringTypes:
- depstring = str(depstring)
- raise Errors.YumBaseError, _('No Package found for %s') % depstring
+ raise Errors.YumBaseError, _('No Package found for %s') % errstring
ps = ListPackageSack(pkglist)
result = self._bestPackageFromList(ps.returnNewestByNameArch())
if result is None:
- if type(depstring) not in types.StringTypes:
- depstring = str(depstring)
- raise Errors.YumBaseError, _('No Package found for %s') % depstring
+ raise Errors.YumBaseError, _('No Package found for %s') % errstring
return result
commit 430ea53e96892d18dbb3af0c9090c9c02a0b05d3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Aug 28 11:10:16 2009 -0400
if we're passed a deptuple keep from passing it to the exception like that
do the str() conversion on the tuple. I didn't just do the str(depstring) in the
msg in case the depstring we're passed is [not] unicode and cannot be encoded/decoded
properly.
There's less chance of that if it a dep tuple.
diff --git a/yum/__init__.py b/yum/__init__.py
index 3f75528..b395457 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2398,11 +2398,15 @@ class YumBase(depsolve.Depsolve):
try:
pkglist = self.returnPackagesByDep(depstring)
except Errors.YumBaseError:
+ if type(depstring) not in types.StringTypes:
+ depstring = str(depstring)
raise Errors.YumBaseError, _('No Package found for %s') % depstring
ps = ListPackageSack(pkglist)
result = self._bestPackageFromList(ps.returnNewestByNameArch())
if result is None:
+ if type(depstring) not in types.StringTypes:
+ depstring = str(depstring)
raise Errors.YumBaseError, _('No Package found for %s') % depstring
return result
More information about the Yum-commits
mailing list