mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00: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,6 +2,8 @@ import sys
|
||||
import re
|
||||
import math
|
||||
import textwrap
|
||||
from functools import reduce
|
||||
|
||||
|
||||
class ModuleDocumentation(object):
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,7 +10,6 @@ import colorsys
|
||||
import json
|
||||
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Generate uORB pub/sub dependency graph from source code')
|
||||
|
||||
|
||||
@@ -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