Skip to content
Browse files

Backwards compatibility with rdflib 2.4 (alternative imports).

  • Loading branch information...
1 parent b0874a9 commit 0b37e48e92974d4a11e2fb0011d158154991f06e @alexsdutton alexsdutton committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 openorg_timeseries/views/endpoint.py
View
6 openorg_timeseries/views/endpoint.py
@@ -7,7 +7,11 @@
import dateutil.parser
import pytz
import rdflib
-from rdflib.namespace import RDF, RDFS
+try: # rdflib 3.0
+ from rdflib.namespace import RDF, RDFS
+except ImportError: # rdflib 2.4
+ from rdflib.RDF import RDFNS as RDF
+ from rdflib.RDFS import RDFSNS as RDFS
from django.conf import settings
from django.core.urlresolvers import reverse

0 comments on commit 0b37e48

Please sign in to comment.
Something went wrong with that request. Please try again.