[virt-tools-list] [virt-manager PATCH 2/4] pep8 E402: module level import not at top of file

Cole Robinson crobinso at redhat.com
Tue Jul 14 17:10:23 UTC 2015


On 07/10/2015 08:07 AM, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  setup.py               |  3 ++-
>  tests/__init__.py      |  8 +++++---
>  virtManager/viewers.py |  6 ++++--
>  virtinst/__init__.py   | 34 +++++++++++++++++-----------------
>  4 files changed, 28 insertions(+), 23 deletions(-)
> 

Pushed patches 3-4. This patch gives me this error on F22:

$ python setup.py test
running test
Traceback (most recent call last):
  File "setup.py", line 629, in <module>
    'test_initrd_inject' : TestInitrdInject,
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 482, in run
    TestBaseCommand.run(self)
  File "setup.py", line 381, in run
    import tests as testsmodule
  File "/home/crobinso/src/virt-manager/tests/__init__.py", line 25, in <module>
    from tests import utils
  File "/home/crobinso/src/virt-manager/tests/utils.py", line 24, in <module>
    import virtinst
  File "/home/crobinso/src/virt-manager/virtinst/__init__.py", line 40, in
<module>
    from virtinst.interface import Interface, InterfaceProtocol
  File "/home/crobinso/src/virt-manager/virtinst/interface.py", line 48, in
<module>
    class InterfaceProtocol(XMLBuilder):
  File "/home/crobinso/src/virt-manager/virtinst/interface.py", line 58, in
InterfaceProtocol
    dhcp = XMLProperty("./dhcp", is_bool=True, doc=_("Whether to enable DHCP"))
NameError: name '_' is not defined


- Cole




More information about the virt-tools-list mailing list