Skip to content

Commit 6dbf365

Browse files
r24milleajdonnison
authored andcommitted
Prevent excessive logging when BaseClient.unzip(...) fails (#169)
* Changed base.unzip() to prevent excessive logging * #112 Changed logging of full unzip content to debug level. This is based off of PR #112 discussion. * #112 Reverted whitespace changes to caiso.py This is based off of PR #112 discussion.
1 parent f3fc90c commit 6dbf365

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ htmlcov
5656
# Certificate key files
5757
*.pem
5858

59-
.DS_Store
59+
.DS_Store

pyiso/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def unzip(self, content):
309309
# have zipfile
310310
z = zipfile.ZipFile(filecontent)
311311
except zipfile.BadZipfile:
312-
LOGGER.error('%s: unzip failure for content:\n%s' % (self.NAME, content))
312+
LOGGER.error('%s: unzip failure for content beginning:\n%s' % (self.NAME, str(content)[0:100]))
313+
LOGGER.debug('%s: Faulty unzip content:\n%s' % (self.NAME, content))
313314
return None
314315

315316
# have unzipped content

0 commit comments

Comments
 (0)