Skip to content

Commit 018f851

Browse files
committed
Correct exception documentation. Closes #42.
1 parent f44bcc8 commit 018f851

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ History
77
++++++++++++++++++
88

99
* Added support for GeoLite2 ASN database.
10+
* Correct documentation of errors raised when using the database reader.
11+
Reported by Radek Holý. GitHub #42.
1012

1113
2.4.2 (2016-12-08)
1214
++++++++++++++++++

README.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,13 @@ ISP Database
313313
Database Reader Exceptions
314314
--------------------------
315315

316-
If the database file does not exist or is not readable, a ``ValueError`` will
317-
be thrown. If the file is invalid or there is a bug in the reader, a
318-
``maxminddb.InvalidDatabaseError`` will be thrown with a description of the
316+
If the database file does not exist or is not readable, the constructor will
317+
raise a ``FileNotFoundError`` on Python 3 or an ``IOError`` on Python 2.
318+
If the IP address passed to a method is invalid, a ``ValueError`` will be
319+
raised. If the file is invalid or there is a bug in the reader, a
320+
``maxminddb.InvalidDatabaseError`` will be raised with a description of the
319321
problem. If an IP address is not in the database, a ``AddressNotFoundError``
320-
exception will be thrown.
322+
will be raised.
321323

322324
Values to use for Database or Dictionary Keys
323325
---------------------------------------------

geoip2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
__version__ = '2.4.2'
55
__author__ = 'Gregory Oschwald'
66
__license__ = 'Apache License, Version 2.0'
7-
__copyright__ = 'Copyright (c) 2013-2016 Maxmind, Inc.'
7+
__copyright__ = 'Copyright (c) 2013-2017 Maxmind, Inc.'

0 commit comments

Comments
 (0)