first pass at converting the filters for python 2/3 compat
This commit is contained in:
+3
-3
@@ -15,7 +15,7 @@ class WarExtractor:
|
||||
member = self.tar.extractfile(tarinfo)
|
||||
docdata = member.read()
|
||||
ok = True
|
||||
except Exception, err:
|
||||
except Exception as err:
|
||||
self.em.rclog("extractone: failed: [%s]" % err)
|
||||
ok = False
|
||||
return (ok, docdata, tarinfo.name, rclexecm.RclExecM.noteof)
|
||||
@@ -26,7 +26,7 @@ class WarExtractor:
|
||||
try:
|
||||
self.tar = tarfile.open(params["filename:"])
|
||||
return True
|
||||
except Exception, err:
|
||||
except Exception as err:
|
||||
self.em.rclog(str(err))
|
||||
return False
|
||||
|
||||
@@ -34,7 +34,7 @@ class WarExtractor:
|
||||
ipath = params["ipath:"]
|
||||
try:
|
||||
tarinfo = self.tar.getmember(ipath)
|
||||
except Exception, err:
|
||||
except Exception as err:
|
||||
self.em.rclog(str(err))
|
||||
return (False, "", ipath, rclexecm.RclExecM.noteof)
|
||||
return self.extractone(tarinfo)
|
||||
|
||||
Reference in New Issue
Block a user