Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions snapchat_bots/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(self, **opts):
self.file = create_temporary_file(suffix)

if self.media_type is MEDIA_TYPE_VIDEO or self.media_type is MEDIA_TYPE_VIDEO_WITHOUT_AUDIO:
self.file = open(video_filename, 'r+')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt this is it. The file is already open from

if data[0:2] == 'PK':
    ...
    self.file = open(video_filename, 'rb')
else:
    ...
    self.file = create_temporary_file(suffix)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

self.file.write(data)
self.file.flush()

Expand Down