nova/tests/fakelibvirt.py fails because it doesn't import time

Bug #1133056 reported by Jay Buffington
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Russell Bryant

Bug Description

When I run the nova tests I see this stacktrace:

    $ python setup.py testr --coverage --testr-args=''
    running testr
    Unimplemented block at relaxng.c:3824
    Exception in thread Thread-1:
    Traceback (most recent call last):
      File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
        self.run()
      File "/usr/lib64/python2.6/threading.py", line 484, in run
        self.__target(*self.__args, **self.__kwargs)
      File "/home/jenkins/workspace/nova-upstream/nova/virt/libvirt/driver.py", line 413, in _native_thread
        libvirt.virEventRunDefaultImpl()
      File "/home/jenkins/workspace/nova-upstream/nova/tests/fakelibvirt.py", line 909, in virEventRunDefaultImpl
        time.sleep(1)
    NameError: global name 'time' is not defined

Adding "import time" to the top of nova/tests/fakelibvirt.py seems to resolve the issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/22940

Changed in nova:
assignee: nobody → Russell Bryant (russellb)
status: New → In Progress
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/22940
Committed: http://github.com/openstack/nova/commit/6cbbec3ee9810d6dcbd84a1313c5ec61d9857364
Submitter: Jenkins
Branch: master

commit 6cbbec3ee9810d6dcbd84a1313c5ec61d9857364
Author: Russell Bryant <email address hidden>
Date: Mon Feb 25 21:08:19 2013 -0500

    Add missing import to fakelibvirt.

    This module calls time.sleep(1), but was not importing the time module.
    This fixes it.

    Fix bug 1133056.

    Change-Id: Ifbba2a98ccdd8d5e26ce466831618ccab9e0b462

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.