summaryrefslogtreecommitdiff
path: root/lib/office.py
diff options
context:
space:
mode:
authorjvoisin2011-07-25 03:21:40 +0200
committerjvoisin2011-07-25 03:21:40 +0200
commitea21231d6d332b5e27e85c0ce0c103cfb56433f8 (patch)
treeec1ca1681f44d19a53599af1980a358e751594e0 /lib/office.py
parent7bec354973580216c64889b925e1f7d6a224d7dd (diff)
Correct handling of unknown fileformat into zipfile (and fixe many previous-commit-bugs)
Diffstat (limited to 'lib/office.py')
-rw-r--r--lib/office.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/office.py b/lib/office.py
index 2302dbc..9a5be3e 100644
--- a/lib/office.py
+++ b/lib/office.py
@@ -27,7 +27,7 @@ class OpenDocumentStripper(archive.GenericArchiveStripper):
27 method here : http://bugs.python.org/issue6818 27 method here : http://bugs.python.org/issue6818
28 ''' 28 '''
29 zipin = zipfile.ZipFile(self.filename, 'r') 29 zipin = zipfile.ZipFile(self.filename, 'r')
30 zipout = zipfile.ZipFile(self.basename + parser.POSTFIX + self.ext, 'w', 30 zipout = zipfile.ZipFile(self.output, 'w',
31 allowZip64=True) 31 allowZip64=True)
32 for item in zipin.namelist(): 32 for item in zipin.namelist():
33 name = os.path.join(self.tempdir, item) 33 name = os.path.join(self.tempdir, item)
@@ -134,7 +134,7 @@ class PdfStripper(parser.Generic_parser):
134 ''' 134 '''
135 def __init__(self, filename, realname, backup): 135 def __init__(self, filename, realname, backup):
136 name, path = os.path.splitext(filename) 136 name, path = os.path.splitext(filename)
137 self.output = name + '.cleaned.' + ext 137 self.output = name + '.cleaned' + ext
138 self.filename = filename 138 self.filename = filename
139 self.backup = backup 139 self.backup = backup
140 self.realname = realname 140 self.realname = realname