JobManagement.get_job() causes FutureWarning

Bug #1639339 reported by Richard G. Pioso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-dracclient
Fix Released
Undecided
Richard G. Pioso

Bug Description

The python-dracclient job resource's JobManagement.get_job() causes a FutureWarning. When that function is called, the following is output.

/usr/lib/python2.7/site-packages/dracclient/resources/job.py:103: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if drac_job:

The fix is straightforward. Change the line to

  if drac_job is not None:

Changed in python-dracclient:
assignee: nobody → Richard G. Pioso (richard.pioso)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-dracclient (master)

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

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-dracclient (master)

Reviewed: https://review.openstack.org/393929
Committed: https://git.openstack.org/cgit/openstack/python-dracclient/commit/?id=5235cdf4b3b7e0dabc94a2dc11ecaa63bf2f35f8
Submitter: Jenkins
Branch: master

commit 5235cdf4b3b7e0dabc94a2dc11ecaa63bf2f35f8
Author: Richard Pioso <email address hidden>
Date: Fri Nov 4 17:01:21 2016 -0400

    JobManagement.get_job() causes FutureWarning

    The python-dracclient job resource's JobManagement.get_job() causes a
    FutureWarning. When that function is called, the following is output.

    /usr/lib/python2.7/site-packages/dracclient/resources/job.py:103:
    FutureWarning: The behavior of this method will change in future
    versions. Use specific 'len(elem)' or 'elem is not None' test instead.
      if drac_job:

    Change the identified line as suggested by the warning.

    Change-Id: I9624b76cbf2e195f387ba104c98ae922619aa1f2
    Closes-Bug: #1639339

Changed in python-dracclient:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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