getRemainingSubscriptions can return -1 if your account has an
unlimited amount of entitlements for the channel you're trying to
subscribe to. The rhn_register GTK+ gui knew about this, but the TUI did
not.

(attached)

-James
From ea69b3e923ab9496c6a794522986646692bf1a0e Mon Sep 17 00:00:00 2001
From: James Bowes <[email protected]>
Date: Tue, 2 Jun 2009 10:40:51 -0400
Subject: [PATCH] Support infinite available entitlements in TUI registration

getRemainingSubscriptions can return -1 if your account has an unlimited
amount of entitlements for the channel you're trying to subscribe to.
The rhn_register GTK+ gui knew about this, but the TUI did not.
---
 .../rhn-client-tools/src/up2date_client/tui.py     |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py 
b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index ff5f271..48cec38 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -1562,7 +1562,8 @@ class Tui:
 
         log.log_debug('subs is %s' % subs)
 
-        if int(subs) > 0:
+        # -1 is infinite
+        if int(subs) != 0:
             log.log_debug('we still have subscriptions %s' % str(subs))
 
             # bz442930 : Should allow registration when login and password is 
changed
-- 
1.6.0.6

Attachment: pgpzAgKPCbBit.pgp
Description: PGP signature

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to