From: Raphael Michel Date: Wed, 12 Dec 2018 15:04:37 +0000 (+0100) Subject: Fix code style issues X-Git-Tag: 2.2.0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=658f5b229c89a8118119a007664a1f6aca2825e8;p=thirdparty%2Fpython-drafthorse.git Fix code style issues --- diff --git a/drafthorse/pdf.py b/drafthorse/pdf.py index e2b6bbe..ca02266 100644 --- a/drafthorse/pdf.py +++ b/drafthorse/pdf.py @@ -30,6 +30,7 @@ import os from io import BytesIO from lxml import etree + from PyPDF2 import PdfFileReader, PdfFileWriter from PyPDF2.generic import (ArrayObject, DecodedStreamObject, DictionaryObject, NameObject, createStringObject) @@ -176,11 +177,11 @@ def _prepare_pdf_metadata_xml(level, pdf_metadata): def _facturx_update_metadata_add_attachment(pdf_filestream, facturx_xml_str, pdf_metadata, facturx_level, output_intents): - md5sum = hashlib.md5(facturx_xml_str).hexdigest() - md5sum_obj = createStringObject(md5sum) + # md5sum = hashlib.md5(facturx_xml_str).hexdigest() + # md5sum_obj = createStringObject(md5sum) pdf_date = datetime.datetime.utcnow().strftime('D:%Y%m%d%H%M%SZ') params_dict = DictionaryObject({ - #NameObject('/CheckSum'): md5sum_obj, + # NameObject('/CheckSum'): md5sum_obj, NameObject('/ModDate'): createStringObject(pdf_date), NameObject('/CreationDate'): createStringObject(pdf_date), NameObject('/Size'): NameObject(str(len(facturx_xml_str))),