Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-09-07 15:55:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-07 15:55:55 +0300
commit272c53f8f01fef7190ac378fd32279054657f99b (patch)
treeb07c01203345662bf716714758f2c1715514dbd4 /source/blender/datatoc
parent5ccdc6ad8611bdefb19e9c1085e20e21892311bc (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.
Diffstat (limited to 'source/blender/datatoc')
-rwxr-xr-xsource/blender/datatoc/datatoc_icon.py9
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)