Add refactoring of file reading

This commit is contained in:
Terencio Agozzino 2018-05-03 20:28:54 +02:00
parent 906c7951df
commit 2f802e71c7
3 changed files with 11 additions and 19 deletions

View file

@ -46,7 +46,6 @@ class ScreenShotter(Inject, Plugin):
try:
with open('./logs/' + img_file, 'wb') as img:
img.write(base64.b64decode(urllib.unquote(request.postData).decode('utf8').split(',')[1]))
img.close()
self.clientlog.info('Saved screenshot to {}'.format(img_file), extra=request.clientInfo)
except Exception as e: