Skip to content

Commit

Permalink
Adds a warning for "Module version, as defined in PEP-0396"
Browse files Browse the repository at this point in the history
  • Loading branch information
nippo committed Aug 31, 2014
1 parent eb3ad80 commit 51c6ee7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions djgeojson/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#: Module version, as defined in PEP-0396.
pkg_resources = __import__('pkg_resources')
distribution = pkg_resources.get_distribution('django-geojson')

__version__ = distribution.version

try:
distribution = pkg_resources.get_distribution('django-geojson')
__version__ = distribution.version
except:
__version__ = 'unknown'
import warnings
warnings.warn('No distribution found.')

GEOJSON_DEFAULT_SRID = 4326

0 comments on commit 51c6ee7

Please sign in to comment.