diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 15:55:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 15:55:55 +0300 |
commit | 272c53f8f01fef7190ac378fd32279054657f99b (patch) | |
tree | b07c01203345662bf716714758f2c1715514dbd4 | |
parent | 5ccdc6ad8611bdefb19e9c1085e20e21892311bc (diff) |
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.
-rwxr-xr-x | source/blender/datatoc/datatoc_icon.py | 9 |
1 files changed, 1 insertions, 8 deletions
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) |