Tools: add Python 2 deprecation warning

This commit is contained in:
martin.gano
2020-11-04 23:32:40 +01:00
parent 66416d1a8b
commit f4ea2dcb74
12 changed files with 88 additions and 11 deletions
+6 -1
View File
@@ -16,8 +16,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import division
from __future__ import division, print_function
import os
import sys
import io
import math
import struct
@@ -451,6 +452,10 @@ 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.")
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
print("WARNING: Python 3 versions older than 3.6 are not supported.")
parser = argparse.ArgumentParser(description="SPIFFS Image Generator",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)