jenkins-bot has submitted this change and it was merged.
Change subject: 7za does not display Everything is Ok on stderr
......................................................................
7za does not display Everything is Ok on stderr
As of 15.14 7za does not display Everything is Ok on stderr
after successfully extracting the content of an archive. Replace this
sanity check with a verification that nothing is displayed on stderr
instead. Any message showing on stderr is considered a fatal error.
Bug: T141608
Change-Id: I3a48f5f1ad2965c4d917290b048f94ab19c79bf2
---
M pywikibot/tools/__init__.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index ff94c70..40f7320 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1057,15 +1057,15 @@
stderr=subprocess.PIPE,
bufsize=65535)
except OSError:
- raise ValueError('7za is not installed and can not '
+ raise ValueError('7za is not installed or cannot '
'uncompress "{0}"'.format(filename))
else:
stderr = process.stderr.read()
process.stderr.close()
- if b'Everything is Ok' not in stderr:
+ if stderr != b'':
process.stdout.close()
- # OSError is also raised when bz2 is invalid
- raise OSError('Invalid 7z archive.')
+ raise OSError(
+ 'Unexpected STDERR output from 7za {0}'.format(stderr))
else:
return process.stdout
else:
--
To view, visit
https://gerrit.wikimedia.org/r/301771
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3a48f5f1ad2965c4d917290b048f94ab19c79bf2
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dachary <loic(a)dachary.org>
Gerrit-Reviewer: Dachary <loic(a)dachary.org>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>