Bug 36635 - python undefined name in UVMM
python undefined name in UVMM
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-13 12:55 CET by Florian Best
Modified: 2015-04-16 10:51 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-11-13 12:55:38 CET
./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:65: undefined name 'uvmm_p'
./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:68: undefined name 'uvmm_c'
./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:72: undefined name 'uvmm_c'
→ The lines where it is imported are uncommented.

./virtualization/univention-virtual-machine-manager-daemon/test/urlparser.py:83: undefined name 'urlparse'
./virtualization/univention-virtual-machine-manager-daemon/test/urlparser.py:84: undefined name 'urlparse'
Comment 1 Philipp Hahn univentionstaff 2015-03-26 11:16:24 CET
(In reply to Florian Best from comment #0)
> ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:65:
> undefined name 'uvmm_p'
> ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:68:
> undefined name 'uvmm_c'
> ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:72:
> undefined name 'uvmm_c'
> → The lines where it is imported are uncommented.

This is dead code, which should be removed (it never worked because until the PEP366 work-around might have fixed it, but the current code calls the external CLI tool anyway, which does the job)

> ./virtualization/univention-virtual-machine-manager-daemon/test/urlparser.py:
> 83: undefined name 'urlparse'
> ./virtualization/univention-virtual-machine-manager-daemon/test/urlparser.py:
> 84: undefined name 'urlparse'

This is a false positive, which is cause by how pyflakes/pylint works - see Bug #32091 comment 1 or <http://www.logilab.org/blogentry/78354>
Comment 2 Philipp Hahn univentionstaff 2015-03-29 11:45:09 CEST
(In reply to Philipp Hahn from comment #1)
> (In reply to Florian Best from comment #0)
> > ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:65:
> > undefined name 'uvmm_p'
> > ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:68:
> > undefined name 'uvmm_c'
> > ./virtualization/univention-virtual-machine-manager-daemon/uvmmd-ldap.py:72:
> > undefined name 'uvmm_c'
> > → The lines where it is imported are uncommented.
> 
> This is dead code, which should be removed (it never worked because until
> the PEP366 work-around might have fixed it, but the current code calls the
> external CLI tool anyway, which does the job)

That code has been removed:
r59484 | Bug #36635 UVMM: Remove dead UDL code

Package: univention-virtual-machine-manager-daemon
Version: 4.0.24-2.592.201503291138
Branch: ucs_4.0-0
Scope: errata4.0-1

r59487 | Bug #36635,Bug #36640 UVMM: YAML
 2015-03-29-univention-virtual-machine-manager-daemon.yaml
Comment 3 Erik Damrose univentionstaff 2015-04-02 15:46:24 CEST
Verified
Comment 4 Janek Walkenhorst univentionstaff 2015-04-16 10:51:32 CEST
<http://errata.univention.de/ucs/4.0/147.html>