TypeError in agent.py when throws an exception

Bug #1682716 reported by Naichuan Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-xenapi
Fix Released
Undecided
Naichuan Sun

Bug Description

There are Grammatical errors in the file agent.py in os-xenapi. Check https://github.com/openstack/os-xenapi/blob/master/os_xenapi/dom0/etc/xapi.d/plugins/agent.py line 260/263.

Error log as below,
  File "/opt/stack/sncstack/os-xenapi/os_xenapi/dom0/etc/xapi.d/plugins/agent.py", line 260, in _wait_for_agent
    "present") % arg_dict["dom_id"]
TypeError: unsupported operand type(s) for %: 'FakeRebootDetectedException' and 'str'

  File "/opt/stack/sncstack/os-xenapi/os_xenapi/dom0/etc/xapi.d/plugins/agent.py", line 263, in _wait_for_agent
    " %s seconds.") % timeout
TypeError: unsupported operand type(s) for %: 'FakeTimeoutException' and 'int'

Naichuan Sun (naichuans)
Changed in os-xenapi:
assignee: nobody → Naichuan Sun (naichuans)
Revision history for this message
Naichuan Sun (naichuans) wrote :

There is another error about "NotImplementedError" not defined, we need to import it from exceptions.
Add this fix as well using the same bug.

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

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

Changed in os-xenapi:
status: New → In Progress
Revision history for this message
Naichuan Sun (naichuans) wrote :

My fault, NotImplementedError needn't import explicitly, remove this change and left only the Type Error fix.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-xenapi (master)

Reviewed: https://review.openstack.org/457133
Committed: https://git.openstack.org/cgit/openstack/os-xenapi/commit/?id=30487e4c415c53101f676e5f9d11b375fbd21194
Submitter: Jenkins
Branch: master

commit 30487e4c415c53101f676e5f9d11b375fbd21194
Author: naichuans <email address hidden>
Date: Mon Apr 17 03:38:22 2017 +0000

    os-xenapi: fix TypeError in agent.py when throws an exception

    There are Grammatical errors in the file agent.py in os-xenapi.

    Change-Id: I9553ae51ed0e5714394cc5117dbe8fa86cc1583b
    Closes-Bug: #1682716

Changed in os-xenapi:
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.