first pass at converting the filters for python 2/3 compat
This commit is contained in:
+4
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user