Merge "Python3 complains when iterate bytes string"

This commit is contained in:
Zuul 2018-11-08 12:13:57 +00:00 committed by Gerrit Code Review
commit d38257dad3
1 changed files with 6 additions and 1 deletions

View File

@ -280,7 +280,12 @@ class DHCPApp(df_base_app.DFlowApp):
return {}
for opt in requested_opts:
opt_int = ord(opt)
# For python3 opt is already int.
if isinstance(opt, str):
opt_int = ord(opt)
else:
opt_int = opt
if opt_int in default_opts:
# already answered by the default options
continue