Bug 1254551

Summary: NameError: global name 'InvalidGpgKeyLocation' is not defined
Product: [Fedora] Fedora Reporter: Tomasz Torcz <tomek>
Component: dnf-plugin-spacewalkAssignee: Michael Mráka <mmraka>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: mmraka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugin-spacewalk-2.4.14-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-29 17:03:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomasz Torcz 2015-08-18 11:37:51 UTC
Description of problem:
After setting "enabled = 1" in plugin config, no dnf operation can be done. Every command fails with:

$ dnf upgrade
This system is receiving updates from Spacewalk server.
Traceback (most recent call last):
  File "/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 193, 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 120, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1032, 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 156, in activate_channels
    'enabled': conf.enabled,
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 225, in __init__
    except InvalidGpgKeyLocation as e:
NameError: global name 'InvalidGpgKeyLocation' is not defined



Version-Release number of selected component (if applicable):
dnf-plugin-spacewalk-2.4.13-1.fc22.noarch

Comment 1 Michael Mráka 2015-08-19 09:15:08 UTC
Fixed in
commit c577ffae23dcbc5a87664db94ac39bd1864f9034
    1254551 - fixed missing InvalidGpgKeyLocation exception

Comment 2 Tomasz Torcz 2015-08-19 14:07:56 UTC
I beg to differ:

This system is receiving updates from Spacewalk server.
Traceback (most recent call last):
  File "/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 193, 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 120, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1032, 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 156, in activate_channels
    'enabled': conf.enabled,
  File "/usr/lib/python2.7/site-packages/dnf-plugins/spacewalk.py", line 226, in __init__
    logger.warn(GPG_KEY_REJECTED, e.msg)
AttributeError: 'InvalidGpgKeyLocation' object has no attribute 'msg'

Comment 3 Tomasz Torcz 2016-04-29 17:03:28 UTC
I'm no longer interested in Spacewalk.