Skip to content

Commit 77b358b

Browse files
committed
Add the seek member function to the file object type ducking.
1 parent f0d0fed commit 77b358b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def make_replay(self, replay_file, **options):
172172

173173
def read_file(self, file_in, **user_options):
174174
# Support file-like objects (with a read method)
175-
if hasattr(file_in, 'read'):
175+
if hasattr(file_in, 'read') and hasattr(file_in, 'seek'):
176176

177177
# Base the options off a copy to leave the Reader options uneffected.
178178
options = self.options.copy()

0 commit comments

Comments
 (0)