Skip to content

Commit fab687c

Browse files
committed
Workaround RTD error to generate the API pages
1 parent 7d506ed commit fab687c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

polymorphic/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99

1010
import pkg_resources
1111

12+
try:
13+
__version__ = pkg_resources.require("django-polymorphic")[0].version
14+
except pkg_resources.DistributionNotFound:
15+
__version__ = None # for RTD among others
1216

13-
__version__ = pkg_resources.require("django-polymorphic")[0].version

0 commit comments

Comments
 (0)