Skip to content

Commit

Permalink
revert p90
Browse files Browse the repository at this point in the history
  • Loading branch information
sandes committed Oct 20, 2022
1 parent d36767b commit 9acb949
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions zipfly/zipfly.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
__version__ = '6.0.4'
__version__ = '6.0.5'
# v

import io
Expand Down Expand Up @@ -190,9 +190,7 @@ def generator(self):

if not self.filesystem in path:

raise RuntimeError(
f" '{self.filesystem}' key is required "
)
raise RuntimeError(f"'{self.filesystem}' key is required")

"""
filesystem should be the path to a file or directory on the filesystem.
Expand All @@ -212,21 +210,18 @@ def generator(self):

with open( path[self.filesystem], 'rb' ) as e:
# Read from filesystem:
with zf.open( z_info, mode = self.mode ) as d:
with zf.open( z_info, mode=self.mode ) as d:

for chunk in iter( lambda: e.read( self.chunksize ), b'' ):
for chunk in iter( lambda: e.read(self.chunksize), b'' ):

d.write( chunk )
d.write(chunk)
yield stream.get()


self.set_comment(self.comment)
zf.comment = self.comment

yield stream.get()

# (TESTING)
# get the real size of the zipfile
self._buffer_size = stream.size()

# Flush and close this stream.
Expand Down

0 comments on commit 9acb949

Please sign in to comment.