From 272c53f8f01fef7190ac378fd32279054657f99b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Sep 2020 22:55:55 +1000 Subject: datatoc_icon: remove Python 2.x support This was originally included in case the system Python was v2.x, remove support since Python 2.x is no longer being maintained. --- source/blender/datatoc/datatoc_icon.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'source/blender/datatoc/datatoc_icon.py') diff --git a/source/blender/datatoc/datatoc_icon.py b/source/blender/datatoc/datatoc_icon.py index 16092431195..6d8b24924f1 100755 --- a/source/blender/datatoc/datatoc_icon.py +++ b/source/blender/datatoc/datatoc_icon.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or @@ -136,13 +135,7 @@ def icondir_to_png(path_src, file_dst): # write pixels with open(file_dst, 'wb') as f_dst: - import sys - # py2/3 compat - if sys.version.startswith("2"): - pixels_data = pixels_canvas.tostring() - else: - pixels_data = pixels_canvas.tobytes() - + pixels_data = pixels_canvas.tobytes() image_data = write_png(pixels_data, canvas_w, canvas_h) f_dst.write(image_data) -- cgit v1.2.3