Skip to content

Commit 600fd2d

Browse files
committed
Simple 2to3 on gen_gallery.py
1 parent 196636f commit 600fd2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/sphinxext/gen_gallery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ def gen_gallery(app, doctree):
121121

122122
gallery_path = os.path.join(app.builder.srcdir, '_templates', 'gallery.html')
123123
if os.path.exists(gallery_path):
124-
fh = file(gallery_path, 'r')
124+
fh = open(gallery_path, 'r')
125125
regenerate = fh.read() != content
126126
fh.close()
127127
else:
128128
regenerate = True
129129
if regenerate:
130-
fh = file(gallery_path, 'w')
130+
fh = open(gallery_path, 'w')
131131
fh.write(content)
132132
fh.close()
133133

134134
for key in app.builder.status_iterator(
135-
thumbnails.iterkeys(), "generating thumbnails... ",
135+
iter(thumbnails.keys()), "generating thumbnails... ",
136136
length=len(thumbnails)):
137137
image.thumbnail(key, thumbnails[key], 0.3)
138138

0 commit comments

Comments
 (0)