utils.py
changeset 5195 e8235b2789fc
parent 5077 dc448c9ad9dd
child 5328 c51e8f62652a
--- a/utils.py	Thu Apr 08 11:04:17 2010 +0200
+++ b/utils.py	Thu Apr 08 13:38:36 2010 +0200
@@ -309,35 +309,6 @@
                                                  self.body.getvalue())
 
 
-def _pdf_conversion_availability():
-    try:
-        import pysixt
-    except ImportError:
-        return False
-    from subprocess import Popen, STDOUT
-    if not os.path.isfile('/usr/bin/fop'):
-        return False
-    try:
-        Popen(['/usr/bin/fop', '-q'],
-              stdout=open(os.devnull, 'w'),
-              stderr=STDOUT)
-    except OSError, e:
-        getLogger('cubicweb').info('fop not usable (%s)', e)
-        return False
-    return True
-
-def can_do_pdf_conversion(__answer_cache=[]):
-    """pdf conversion depends on
-    * pysixt (python package)
-    * fop 0.9x
-
-    NOTE: actual check is done by _pdf_conversion_availability and
-    result is cached
-    """
-    if not __answer_cache: # first time, not in cache
-        __answer_cache.append(_pdf_conversion_availability())
-    return __answer_cache[0]
-
 try:
     # may not be there if cubicweb-web not installed
     from simplejson import dumps, JSONEncoder