client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 3612ebb308e43497ab380464f2d197e591579396 Author: Miroslav Suchý msuchy@redhat.com Date: Thu Feb 24 14:28:58 2011 +0100
651792 - if system is not registered, print nice error insted of TB
addressing: Traceback (most recent call last): File "/usr/sbin/rhn-channel", line 139, in <module> main() File "/usr/sbin/rhn-channel", line 125, in main channels = map(lambda x: x['label'], getChannels().channels()) File "/usr/share/rhn/up2date_client/rhnChannel.py", line 97, in getChannels raise up2dateErrors.NoSystemIdError(_("Unable to Locate SystemId")) up2date_client.up2dateErrors.NoSystemIdError: Unable to Locate SystemId
diff --git a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py index c2fba91..b798b4f 100644 --- a/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py +++ b/client/rhel/rhn-client-tools/src/bin/spacewalk-channel.py @@ -129,6 +129,8 @@ def main(): channels = map(lambda x: x['label'], getChannels().channels()) except up2dateErrors.NoChannelsError: systemExit(1, _('This system is not associated with any channel.')) + except up2dateErrors.NoSystemIdError: + systemExit(1, _('Unable to locate SystemId file. Is this system registered?')) channels.sort() print '\n'.join(channels) elif OPTIONS.available_channels: