tools: Redirect some warnings to stderr

This commit is contained in:
Anton Maklakov 2020-12-15 12:41:20 +07:00
parent a10d115e84
commit 3fc9ab4eb3
2 changed files with 4 additions and 4 deletions

View File

@ -250,9 +250,9 @@ def _erase_ota_partition(target, ota_id):
def main():
if sys.version_info[0] < 3:
print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.")
print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.", file=sys.stderr)
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
print("WARNING: Python 3 versions older than 3.6 are not supported.")
print("WARNING: Python 3 versions older than 3.6 are not supported.", file=sys.stderr)
global quiet
parser = argparse.ArgumentParser("ESP-IDF OTA Partitions Tool")

View File

@ -453,9 +453,9 @@ class SpiffsFS():
def main():
if sys.version_info[0] < 3:
print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.")
print("WARNING: Support for Python 2 is deprecated and will be removed in future versions.", file=sys.stderr)
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
print("WARNING: Python 3 versions older than 3.6 are not supported.")
print("WARNING: Python 3 versions older than 3.6 are not supported.", file=sys.stderr)
parser = argparse.ArgumentParser(description="SPIFFS Image Generator",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)