def check_recode(): try: import _recode except SystemError: raise RuntimeError("the recode library is probably broken.") # First, check if the recode version has the famous 3.6 bug rq = _recode.request("latin1..latex") if _recode.recode(rq, "abc") != "abc": raise RuntimeError("the _recode module is broken.") return 0
def check_recode(): try: import _recode except SystemError: raise RuntimeError('the recode library is probably broken.') # First, check if the recode version has the famous 3.6 bug rq = _recode.request('latin1..latex') if _recode.recode(rq, 'abc') != 'abc': raise RuntimeError('the _recode module is broken.') return 0
warning('cannot test gtk [no DISPLAY]') except: etype, value, tb = sys.exc_info () traceback.print_exception (etype, value, tb) error ('unexpected error') else: if gtk.pygtk_version < (2,4,0): error ('requested version for PyGtk is %s, but I detected %s' % ('2.4.0', v)) try: import _recode import _bibtex import Pyblio rq = _recode.request('latin1..latex') l = 'abcd' c = _recode.recode(rq, l) if l != c: error('broken recode version') except ImportError, msg: error('error in python modules dependencies: %s' % msg) try: _bibtex.next_unfiltered except AttributeError, msg: error('Error in python-bibtex module: required function »next_unfiltered« missing: %s' % msg) except:
def __init__ (self, request): self.request = _recode.request (request) return