Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
a561f0f1
Commit
a561f0f1
authored
Oct 09, 2013
by
Aurel
Committed by
Kazuhiko Shiozaki
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean-up import, whitespace, not used variables
parent
38f2d50a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
product/ERP5/Document/PDFDocument.py
product/ERP5/Document/PDFDocument.py
+5
-6
No files found.
product/ERP5/Document/PDFDocument.py
View file @
a561f0f1
...
...
@@ -33,8 +33,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5.Document.Image
import
Image
from
Products.ERP5.Document.Document
import
ConversionError
,
\
VALID_TEXT_FORMAT_LIST
from
Products.ERP5.Document.Document
import
ConversionError
from
subprocess
import
Popen
,
PIPE
from
zLOG
import
LOG
,
INFO
,
PROBLEM
import
errno
...
...
@@ -82,7 +81,7 @@ class PDFDocument(Image):
* Watermark is applied at all pages starting watermark_start_page (this
index is 0 based)
"""
from
pyPdf
import
PdfFileWriter
,
PdfFileReader
,
pdf
from
pyPdf
import
PdfFileWriter
,
PdfFileReader
if
not
watermark_data
:
raise
ValueError
(
"watermark_data cannot not be empty"
)
if
not
self
.
hasData
():
...
...
@@ -320,7 +319,7 @@ class PDFDocument(Image):
# Ignore values that cannot be pickled ( such as AAPL:Keywords )
try
:
pickle
.
dumps
(
info_value
)
except
pickle
.
PicklingError
,
err
:
except
pickle
.
PicklingError
:
LOG
(
"PDFDocument.getContentInformation"
,
INFO
,
"Ignoring non picklable document info on %s: %s (%r)"
%
(
self
.
getRelativeUrl
(),
info_key
,
info_value
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment