mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 05:13:34 +08:00
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:
committed by
Julian Oes
parent
2a848c365c
commit
6dc55f97d4
+2
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user