From ee740a5ca64b06484c68fa4a7f70eb6fca6d5f2c Mon Sep 17 00:00:00 2001 From: Leon Jacobs Date: Wed, 10 Jan 2018 12:10:39 +0200 Subject: [PATCH] Fix write mode when writing screenshot files. Fixes #44 --- objection/commands/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objection/commands/ui.py b/objection/commands/ui.py index 3070cfd2..c4cc83a4 100644 --- a/objection/commands/ui.py +++ b/objection/commands/ui.py @@ -66,7 +66,7 @@ def ios_screenshot(args: list = None) -> None: image = response.get_extra_data() - with open(destination, 'w') as f: + with open(destination, 'wb') as f: f.write(image) click.secho('Screenshot saved to: {0}'.format(destination), fg='green')