don't require rlextra
authorrobin
Fri, 20 Aug 2021 10:45:17 +0100
changeset 86 0cf809f322a8
parent 85 75ebfe9feba5
child 87 beb39c22f579
don't require rlextra
test/leaktest.py
--- a/test/leaktest.py	Fri Aug 20 10:17:17 2021 +0100
+++ b/test/leaktest.py	Fri Aug 20 10:45:17 2021 +0100
@@ -21,8 +21,12 @@
 well as the National Centre for Early Music itself.</p>"""
 
 	def find_dtd():
-		import rlextra
-		return os.path.join(rlextra.__path__[0],'dtd','xhtml1')
+		try:
+			import rlextra
+		except ImportError:
+			return os.path.join(os.path.dirname(__file__),'xhtml1')
+		else:
+			return os.path.join(rlextra.__path__[0],'dtd','xhtml1')
 
 	def ident(x,dtdDir=find_dtd(),path_isfile=os.path.isfile,path_join=os.path.join):
 		bn = x.split('/')[-1]