[yum-git] yum/config.py

James Antill james at linux.duke.edu
Tue Jan 22 14:35:41 UTC 2008


 yum/config.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 617afce066e8fe93979bb88408e5265126a8563d
Author: James Antill <james at and.org>
Date:   Tue Jan 22 09:35:23 2008 -0500

    Fix ranges on IntOption

diff --git a/yum/config.py b/yum/config.py
index 0ee6c35..85dcd36 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -233,7 +233,9 @@ class IntOption(Option):
             val = int(s)
         except (ValueError, TypeError), e:
             raise ValueError('invalid integer value')
-        if val > range_max or val < range_min:
+        if self._range_max is not None and val > self._range_max:
+            raise ValueError('out of range integer value')
+        if self._range_min is not None and val < self._range_min:
             raise ValueError('out of range integer value')
         return val
 



More information about the Yum-cvs-commits mailing list