refactoring imports and reindex() method
@@ -91,7 +91,6 @@ from builtins import object, str
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
-import io
import os
import weakref
import sys
@@ -402,7 +401,9 @@ class Loader(object):
dir = dir.rstrip('/')
# path looks like a ZIP file, dir resides within ZIP
- if path:
+ if not path:
+ continue
+
zip_stream = self._get_stream(path)
if zip_stream:
zip = zipfile.ZipFile(zip_stream, 'r')
@@ -432,7 +433,7 @@ class Loader(object):
volume_index += 1
- zip_stream = io.BytesIO(bytes_)
+ zip_stream = BytesIO(bytes_)
if zipfile.is_zipfile(zip_stream):
return zip_stream
else:
