client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 27 ++++++--------
1 file changed, 12 insertions(+), 15 deletions(-)
New commits:
commit 4979f339abf9189d10703bd5bada1d6201a904a7
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Feb 12 14:11:46 2010 +0100
The getAvailableChannels is never called with useCache set to true, therefore is it
always False, therefore no caching.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index cbcbe2a..53e6368 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -44,7 +44,6 @@ REG_NUM_FILE = "%s/install-num" % SYSID_DIR
cachedOrgs = None
cachedAvailableSubscriptions = None
-cachedAvailableChannels = None
import config
cfg = config.initUp2dateConfig()
@@ -408,29 +407,27 @@ def registerSystem(username = None, password = None,
-def getAvailableChannels(username, password, other, useCache = False):
-
- global cachedAvailableChannels
-
+def getAvailableChannels(username, password, other):
s = rhnserver.RhnServer()
server_arch = up2dateUtils.getArch()
server_version = up2dateUtils.getVersion()
server_release = up2dateUtils.getRelease()
- if cachedAvailableChannels is None or useCache == False:
- try:
- cachedAvailableChannels = rpcServer.doCall(
- s.registration.available_eus_channels,
+ availableChannels = None
+
+ try:
+ availableChannels = rpcServer.doCall(
+ s.registration.available_eus_channels,
username, password,
server_arch, server_version,
server_release)
- except rpclib.Fault, f:
- if f.faultCode == 99:
- raise up2dateErrors.DelayError(f.faultString)
- else:
- raise
+ except rpclib.Fault, f:
+ if f.faultCode == 99:
+ raise up2dateErrors.DelayError(f.faultString)
+ else:
+ raise
- return cachedAvailableChannels
+ return availableChannels
Show replies by date