first pass at converting the filters for python 2/3 compat

This commit is contained in:
Jean-Francois Dockes
2015-11-06 16:49:03 +01:00
parent cc68331f3d
commit f344e8fedd
21 changed files with 298 additions and 255 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
# dia (http://live.gnome.org/Dia) file filter for recoll
# stefan.friedel@iwr.uni-heidelberg.de 2012
#
@@ -66,7 +68,7 @@ class DiaExtractor:
try:
docdata = self.ExtractDiaText()
ok = True
except Exception, err:
except Exception as err:
ok = False
iseof = rclexecm.RclExecM.eofnext
self.em.setmimetype("text/plain")
@@ -76,7 +78,7 @@ class DiaExtractor:
def openfile(self, params):
try:
self.dia = GzipFile(params["filename:"], 'r')
# Dial files are sometimes not compressed. Quite weirdly,
# Dia files are sometimes not compressed. Quite weirdly,
# GzipFile does not complain until we try to read. Have to do it
# here to be able to retry an uncompressed open.
data = self.dia.readline()