TypeError: ord() expected string of length 1, but int found

Bug #1792120 reported by Hong Hui Xiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
Undecided
Unassigned

Bug Description

 2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp File "/root/dragonflow/dragonflow/controller/apps/dhcp.py", line 129, in packet_in_handler
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp self._handle_dhcp_request(pkt, lport, dhcp_lport)
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp File "/root/dragonflow/dragonflow/controller/apps/dhcp.py", line 143, in _handle_dhcp_request
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp dhcp_port)
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp File "/root/dragonflow/dragonflow/controller/apps/dhcp.py", line 186, in _create_dhcp_response
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp dhcp_server_address)
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp File "/root/dragonflow/dragonflow/controller/apps/dhcp.py", line 231, in _build_dhcp_options
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp default_opts)
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp File "/root/dragonflow/dragonflow/controller/apps/dhcp.py", line 284, in _build_response_requested_options
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp opt_int = ord(opt)
2018-09-11 16:37:30.050 4008223 ERROR dragonflow.controller.apps.dhcp TypeError: ord() expected string of length 1, but int found

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

Reviewed: https://review.openstack.org/601968
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=98c1553af9b8e4122d1d7cad1f28d7ea0e932326
Submitter: Zuul
Branch: master

commit 98c1553af9b8e4122d1d7cad1f28d7ea0e932326
Author: Hong Hui Xiao <email address hidden>
Date: Tue Sep 11 09:05:33 2018 +0000

    Python3 complains when iterate bytes string

    Using Python3 to iterate a bytes string, int will be presented.
    However, in Python2, str will be presented.

    Closes-Bug: #1792120
    Change-Id: Id30f5f1da989fdb71e0f9b627e875e0c41f89b30

Changed in dragonflow:
status: New → 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.