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 11:05:55 +01:00
committed by Julian Oes
parent 2a848c365c
commit 6dc55f97d4
14 changed files with 107 additions and 105 deletions

View File

@@ -2,6 +2,8 @@ import sys
import re
import math
import textwrap
from functools import reduce
class ModuleDocumentation(object):
"""

View File

@@ -10,6 +10,7 @@ pyserial>=3.0
pyulog>=0.5.0
pyyaml
setuptools>=39.2.0
six>=1.12.0
toml>=0.9
tornado
wheel>=0.31.1

View File

@@ -10,7 +10,6 @@ import colorsys
import json
parser = argparse.ArgumentParser(
description='Generate uORB pub/sub dependency graph from source code')

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