More fixes for Python 3 compatibility (#13008)

* More fixes for Python 3 compatibility

* Workaround if the six module is not pip installed

* Lose the semicolons
This commit is contained in:
Christian Clauss
2019-12-19 02:05:55 -08:00
committed by Julian Oes
parent 2a848c365c
commit 6dc55f97d4
14 changed files with 107 additions and 105 deletions
+2 -7
View File
@@ -10,10 +10,10 @@ Upload an ULog file to the logs.px4.io web server.
from __future__ import print_function
from argparse import ArgumentParser
from six.moves import input
import subprocess
import sys
try:
import requests
except:
@@ -38,12 +38,7 @@ def ask_value(text, default=None):
if default != None:
ask_string += ' (Press ENTER to use ' + default + ')'
ask_string += ': '
if sys.version_info[0] < 3:
ret = raw_input(ask_string)
else:
ret = input(ask_string)
ret = input(ask_string).strip()
if ret == "" and default != None:
return default
return ret