diff --git a/requirements.in b/requirements.in index c1e5b18..d74aa87 100644 --- a/requirements.in +++ b/requirements.in @@ -1,3 +1,4 @@ pip-tools raven twine +flake8 diff --git a/requirements.txt b/requirements.txt index c81c14a..9d559c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,9 +8,13 @@ certifi==2018.1.18 # via requests chardet==3.0.4 # via requests click==6.7 # via pip-tools first==2.0.1 # via pip-tools +flake8==3.5.0 idna==2.6 # via requests +mccabe==0.6.1 # via flake8 pip-tools==1.11.0 pkginfo==1.4.2 # via twine +pycodestyle==2.3.1 # via flake8 +pyflakes==1.6.0 # via flake8 raven==6.5.0 requests-toolbelt==0.8.0 # via twine requests==2.18.4 # via requests-toolbelt, twine diff --git a/setup.py b/setup.py index 166e87a..3b7f372 100644 --- a/setup.py +++ b/setup.py @@ -3,12 +3,12 @@ setup( name = 'zappa_sentry', packages = ['zappa_sentry'], - version = '0.2.1', + version = '0.2.2', description = 'Easy integration with sentry for zappa apps', author = 'João Miguel Neves', author_email = 'joao@silvaneves.org', url = 'https://github.com/jneves/zappa-sentry', - download_url = 'https://github.com/jneves/zappa-sentry/archive/0.2.1.tar.gz', + download_url = 'https://github.com/jneves/zappa-sentry/archive/0.2.2.tar.gz', keywords = 'logging zappa sentry', install_requires=[ 'raven' diff --git a/zappa_sentry/__init__.py b/zappa_sentry/__init__.py index 9d4b5f8..bff8a8f 100644 --- a/zappa_sentry/__init__.py +++ b/zappa_sentry/__init__.py @@ -1,6 +1,7 @@ from configparser import ConfigParser import json import os +import sys from raven import Client from raven.transport.http import HTTPTransport @@ -15,7 +16,8 @@ def get_raven_client(): if not this._raven_client: - this._raven_client = Client(this.raven_config.get('DEFAULT', 'SENTRY_DSN'), transport=HTTPTransport) + this._raven_client = Client(this.raven_config.get('DEFAULT', 'SENTRY_DSN'), + transport=HTTPTransport) return this._raven_client @@ -29,7 +31,7 @@ def unhandled_exceptions(e, event, context): package_info_file.close() raven_client.context.merge({'tags': package_info}) - except: + except OSError: # not deployed, probably a test pass