Bug 1263707 - UnboundLocalError: local variable 'e' referenced before assignment
Summary: UnboundLocalError: local variable 'e' referenced before assignment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space24
TreeView+ depends on / blocked
 
Reported: 2015-09-16 13:19 UTC by Pavel Studeník
Modified: 2015-10-08 13:27 UTC (History)
2 users (show)

Fixed In Version: rhn-client-tools-2.4.9-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-08 13:27:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2015-09-16 13:19:38 UTC
Description of problem:
I get traceback when system is not registered to spacewalk and dnf-plugin-spacewalk is enabled.


Version-Release number of selected component (if applicable):
rhn-client-tools-2.4.8-1.fc22.noarch

How reproducible:
always

Steps to Reproduce:
1. install new system and dnf-plugin-spacewalk
2. without registration to spacewalk or remove row serverURL in /etc/sysconfig/rhn/up2date


Actual results:
[root@test01-64 ~]# dnf update -y
Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)   
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 117, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1034, in configure
    self.base.plugins.run_config()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 82, in config
    self.activate_channels(self.cli.demands.sack_activation)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 101, in activate_channels
    login_info = up2date_client.up2dateAuth.getLoginInfo(timeout=self.conf.timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 227, in getLoginInfo
    login(timeout=timeout) 
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 194, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 63, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 212, in doCall
    if len(e.args) > 1:
UnboundLocalError: local variable 'e' referenced before assignment

Comment 1 Miroslav Suchý 2015-09-16 14:15:25 UTC
Forwarding to upstream. This is present in current master.

Comment 2 Jan Dobes 2015-09-16 14:53:00 UTC
reproduced by setting in client's /etc/sysconfig/rhn/up2date:

serverURL=http://localhost/

fixed in spacewalk master:

ce93dd82d896ac21de3dedfe92fab24afa29a061

Comment 3 Jan Dobes 2015-10-08 13:27:14 UTC
Spacewalk 2.4 has been released.


Note You need to log in before you can comment on or make changes to this bug.