Skip to content

Instantly share code, notes, and snippets.

@garrettr
Created May 7, 2015 19:13
Show Gist options
  • Save garrettr/59ad3112df829887caa4 to your computer and use it in GitHub Desktop.
Save garrettr/59ad3112df829887caa4 to your computer and use it in GitHub Desktop.
Intermittent Travis Error in `crypto_util.encrypt`
tests/test_unit_integration.py ....Exception in thread Thread-156:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 504, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/gnupg/_meta.py", line 541, in _read_response
result._handle_status(keyword, value)
File "/usr/local/lib/python2.7/dist-packages/gnupg/_parsers.py", line 860, in _handle_status
raise ValueError("Unknown status message: %r" % key)
ValueError: Unknown status message: u'ERROR'
F...
tests/test_unit_journalist.py ...........
tests/test_unit_source.py ...............
tests/test_unit_store.py ..
=================================== FAILURES ===================================
______________________ TestIntegration.test_reply_normal _______________________
self = <tests.test_unit_integration.TestIntegration testMethod=test_reply_normal>
def test_reply_normal(self):
> self.helper_test_reply("This is a test reply.", True)
tests/test_unit_integration.py:258:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_unit_integration.py:350: in helper_test_reply
), follow_redirects=True)
/usr/local/lib/python2.7/dist-packages/werkzeug/test.py:772: in post
return self.open(*args, **kw)
/usr/local/lib/python2.7/dist-packages/flask/testing.py:108: in open
follow_redirects=follow_redirects)
/usr/local/lib/python2.7/dist-packages/werkzeug/test.py:736: in open
response = self.run_wsgi_app(environ, buffered=buffered)
/usr/local/lib/python2.7/dist-packages/werkzeug/test.py:659: in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
/usr/local/lib/python2.7/dist-packages/werkzeug/test.py:855: in run_wsgi_app
app_iter = app(environ, start_response)
/usr/local/lib/python2.7/dist-packages/flask/app.py:1836: in __call__
return self.wsgi_app(environ, start_response)
/usr/local/lib/python2.7/dist-packages/flask/app.py:1820: in wsgi_app
response = self.make_response(self.handle_exception(e))
/usr/local/lib/python2.7/dist-packages/flask/app.py:1403: in handle_exception
reraise(exc_type, exc_value, tb)
/usr/local/lib/python2.7/dist-packages/flask/app.py:1817: in wsgi_app
response = self.full_dispatch_request()
/usr/local/lib/python2.7/dist-packages/flask/app.py:1477: in full_dispatch_request
rv = self.handle_user_exception(e)
/usr/local/lib/python2.7/dist-packages/flask/app.py:1381: in handle_user_exception
reraise(exc_type, exc_value, tb)
/usr/local/lib/python2.7/dist-packages/flask/app.py:1475: in full_dispatch_request
rv = self.dispatch_request()
/usr/local/lib/python2.7/dist-packages/flask/app.py:1461: in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
journalist.py:86: in wrapper
return func(*args, **kwargs)
journalist.py:438: in reply
output=store.path(g.sid, filename))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
plaintext = 'This is a test reply.'
fingerprints = [None, '65A1B5FF195B56353CC63DFFCC40EF1228271441']
output = '/tmp/securedrop/store/NI7JQTX5P4NWMPQ2KNPIZKPTMZ5XRUJOAAJHYB2NWJVH5ONSNCWN5COAWZV5YQTA7JUCCU2RG3452P22MQJULCRYZRM2TCXDWJUWG5Y=/3-volumetric_gendarmerie-reply.gpg'
def encrypt(plaintext, fingerprints, output=None):
# Verify the output path
if output:
store.verify(output)
# Remove any spaces from provided fingerprints
# GPG outputs fingerprints with spaces for readability, but requires the
# spaces to be removed when using fingerprints to specify recipients.
if not isinstance(fingerprints, (list, tuple)):
fingerprints = [fingerprints, ]
> fingerprints = [fpr.replace(' ', '') for fpr in fingerprints]
E AttributeError: 'NoneType' object has no attribute 'replace'
crypto_util.py:155: AttributeError
===================== 1 failed, 48 passed in 24.26 seconds =====================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment