Browse Source

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
changes/29/393929/1
Richard Pioso 5 years ago
parent
commit
5235cdf4b3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      dracclient/resources/job.py

+ 1
- 1
dracclient/resources/job.py View File

@ -100,7 +100,7 @@ class JobManagement(object):
drac_job = utils.find_xml(doc, 'DCIM_LifecycleJob',
uris.DCIM_LifecycleJob)
if drac_job:
if drac_job is not None:
return self._parse_drac_job(drac_job)
def create_config_job(self, resource_uri, cim_creation_class_name,


Loading…
Cancel
Save