summaryrefslogtreecommitdiff
blob: 0ec1df9588d453df5db92bd6c012835c138db795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: /trunk/twisted/lore/latex.py
===================================================================
--- a/trunk/twisted/lore/latex.py (revision 11450)
+++ b/trunk/twisted/lore/latex.py (revision 13880)
@@ -5,5 +5,5 @@
 
 from twisted.web import microdom, domhelpers
-from twisted.python import text
+from twisted.python import text, procutils
 import os, os.path, re, string
 from cStringIO import StringIO
@@ -104,9 +104,5 @@
 
     baseLevel = 0
-    try:
-        diaHack = not not os.popen('which dia').read()
-    except:
-        # That's a no, then.
-        diaHack = 0
+    diaHack = bool(procutils.which("dia"))
 
     def writeNodeData(self, node):