From 0f60c244e8d55180a52905a722a47944f5b70822 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 30 Aug 2019 13:40:57 +0100 Subject: [PATCH] mkicon.py: Cope with Python 3's range(). On Python 3, range() returns an iterator, not a list. Wrap it in list() when a list is needed. --- icons/mkicon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icons/mkicon.py b/icons/mkicon.py index 5eeb8a68..c0f3ca17 100755 --- a/icons/mkicon.py +++ b/icons/mkicon.py @@ -74,7 +74,7 @@ def memoisedsqrt(x): sqrthash[x] = math.sqrt(x) return sqrthash[x] -BR, TR, BL, TL = range(4) # enumeration of quadrants for border() +BR, TR, BL, TL = list(range(4)) # enumeration of quadrants for border() def border(canvas, thickness, squarecorners, out={}): # I haven't yet worked out exactly how to do borders in a @@ -992,7 +992,7 @@ if colours == 0: return (col1, col2) elif colours == 1: # Windows 16-colour palette. - cK,cr,cg,cy,cb,cm,cc,cP,cw,cR,cG,cY,cB,cM,cC,cW = range(16) + cK,cr,cg,cy,cb,cm,cc,cP,cw,cR,cG,cY,cB,cM,cC,cW = list(range(16)) cT = -1 cD = -2 # special translucent half-darkening value used internally def greypix(value):