Skip to content

Commit d713a3f

Browse files
author
BoboTiG
committed
MSS:to_png() returns None
1 parent 5c95d1f commit d713a3f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

mss.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,7 @@ def save(self,
186186
def to_png(self, data, width, height, output):
187187
''' Dump data to the image file.
188188
Pure python PNG implementation.
189-
Image represented as RGB tuples, no interlacing.
190189
http://inaps.org/journal/comment-fonctionne-le-png
191-
192-
Returns True if no error. Else raises ScreenshotError.
193190
'''
194191

195192
with open(output, 'wb') as fileh:
@@ -217,7 +214,7 @@ def to_png(self, data, width, height, output):
217214
iend = b'4IEND'
218215

219216
fileh.write(magic + b''.join(ihdr) + b''.join(idat) + iend)
220-
return True
217+
return
221218

222219
err = 'MSS: error writing data to "{0}".'.format(output)
223220
raise ScreenshotError(err)

0 commit comments

Comments
 (0)