Skip to content

Commit

Permalink
Merge pull request #12 from ibrahimsag/patch-2
Browse files Browse the repository at this point in the history
fix response error and warning controls
  • Loading branch information
JDBurnZ committed Nov 4, 2015
2 parents 655cc81 + bf391f4 commit 9cadcb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyminfraud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
__license__ = '''pyminfraud by Joshua D. Burns is licensed under the Creative Commons Attribution
3.0 Unported License. To view a copy of this license, please visit:
http://creativecommons.org/licenses/by/3.0/'''
__version__ = '1.0.2'
__version__ = '1.0.3'
__created__ = '2013-10-01'
__status__ = 'Production'
__description__ = 'Python library for interfacing with MaxMind\'s minFraud Web Service API.',
__url__ = 'https://www.github.com/JDBurnZ/pyminfraud'
__downloadurl__ = 'https://www.github.com/JDBurnZ/pyminfraud/tarball/1.0.3'
__packages__ = ['pyminfraud']
__keywords__ = 'python maxmind minfraud pyminfraud'

Expand Down Expand Up @@ -106,11 +107,11 @@ def execute(self, timeout=30, protocol=request_protocol, host=request_hosts[0],
self.result = self._response_parse(self.response.read())

# Check if resulting response contains errors.
if self._response_errors(self.response):
if self._response_errors(self.result):
raise exceptions.ResponseError(errors.response_errors[self.result['err']])

# Check if resulting response contains warnings.
if self._response_warnings(self.response):
if self._response_warnings(self.result):
raise exceptions.ResponseWarning(errors.response_warnings[self.result['err']])

return self.result
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
name = pyminfraud.__project__,
packages = pyminfraud.__packages__,
url = pyminfraud.__url__,
download_url = pyminfraud.__downloadurl__,
version = pyminfraud.__version__,
)

0 comments on commit 9cadcb0

Please sign in to comment.