From fdd2fbd85a7bd8a9d93a3cfc08b37fe8f52dd7f2 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Thu, 19 Dec 2019 20:18:49 -0500 Subject: [PATCH] removed old exception files --- pdfmajor/execptions.py | 2 +- .../parser/PDFDocument/PDFSecurityHandler.py | 1 - pdfmajor/parser/PDFDocument/PDFXRef.py | 1 - pdfmajor/parser/PDFDocument/exceptions.py | 22 ------------------- pdfmajor/parser/PDFStream/PDFObjRef.py | 1 - pdfmajor/parser/PDFStream/__init__.py | 1 - pdfmajor/parser/PDFStream/exceptions.py | 16 -------------- pdfmajor/parser/PDFStream/util.py | 1 - pdfmajor/parser/PSStackParser/__init__.py | 1 - pdfmajor/parser/PSStackParser/exceptions.py | 2 -- pdfmajor/parser/exceptions.py | 5 ----- 11 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 pdfmajor/parser/PDFDocument/exceptions.py delete mode 100644 pdfmajor/parser/PDFStream/exceptions.py delete mode 100644 pdfmajor/parser/PSStackParser/exceptions.py delete mode 100644 pdfmajor/parser/exceptions.py diff --git a/pdfmajor/execptions.py b/pdfmajor/execptions.py index 632a512..ac60c68 100644 --- a/pdfmajor/execptions.py +++ b/pdfmajor/execptions.py @@ -73,7 +73,7 @@ class EOFB(CCITTExeception): class InvalidData(CCITTExeception): pass -class ByteSkip(ExceptCCITTExeceptionion): +class ByteSkip(CCITTExeception): pass class PDFTextExtractionNotAllowed(ParserError): diff --git a/pdfmajor/parser/PDFDocument/PDFSecurityHandler.py b/pdfmajor/parser/PDFDocument/PDFSecurityHandler.py index 09ddd6b..71b9bc1 100644 --- a/pdfmajor/parser/PDFDocument/PDFSecurityHandler.py +++ b/pdfmajor/parser/PDFDocument/PDFSecurityHandler.py @@ -3,7 +3,6 @@ import hashlib as md5 from Crypto.Cipher import ARC4, AES from Crypto.Hash import SHA256 -from .exceptions import * # pylint: disable=W0614 from ..PDFStream import int_value, str_value, dict_value from ..PSStackParser import literal_name from ...utils import int2byte, struct diff --git a/pdfmajor/parser/PDFDocument/PDFXRef.py b/pdfmajor/parser/PDFDocument/PDFXRef.py index ad3414b..cb2bdaa 100644 --- a/pdfmajor/parser/PDFDocument/PDFXRef.py +++ b/pdfmajor/parser/PDFDocument/PDFXRef.py @@ -11,7 +11,6 @@ from ..PDFStream import PDFStream from ..PDFStream import dict_value from .constants import LITERAL_OBJSTM, LITERAL_XREF -from .exceptions import PDFNoValidXRef, PDFSyntaxError log = getLogger(__name__) diff --git a/pdfmajor/parser/PDFDocument/exceptions.py b/pdfmajor/parser/PDFDocument/exceptions.py deleted file mode 100644 index c08aef2..0000000 --- a/pdfmajor/parser/PDFDocument/exceptions.py +++ /dev/null @@ -1,22 +0,0 @@ -from ..PDFParser import PDFSyntaxError -from ..PDFStream import PDFException - -## Exceptions -## -class PDFNoValidXRef(PDFSyntaxError): - pass - -class PDFNoOutlines(PDFException): - pass - -class PDFDestinationNotFound(PDFException): - pass - -class PDFEncryptionError(PDFException): - pass - -class PDFPasswordIncorrect(PDFEncryptionError): - pass - -class PDFTextExtractionNotAllowed(PDFEncryptionError): - pass \ No newline at end of file diff --git a/pdfmajor/parser/PDFStream/PDFObjRef.py b/pdfmajor/parser/PDFStream/PDFObjRef.py index c1df8e6..2d7652e 100644 --- a/pdfmajor/parser/PDFStream/PDFObjRef.py +++ b/pdfmajor/parser/PDFStream/PDFObjRef.py @@ -6,7 +6,6 @@ from ...utils import lzwdecode, settings from .constants import * # pylint: disable=W0614 from .types import * # pylint: disable=W0614 -from .exceptions import * # pylint: disable=W0614 ## PDFObjRef ## diff --git a/pdfmajor/parser/PDFStream/__init__.py b/pdfmajor/parser/PDFStream/__init__.py index 5ecf985..82ec8c0 100644 --- a/pdfmajor/parser/PDFStream/__init__.py +++ b/pdfmajor/parser/PDFStream/__init__.py @@ -5,7 +5,6 @@ from ...utils import ascii85decode, asciihexdecode, apply_png_predictor from .constants import * from .types import * -from .exceptions import * from .util import * from .ccitt import ccittfaxdecode diff --git a/pdfmajor/parser/PDFStream/exceptions.py b/pdfmajor/parser/PDFStream/exceptions.py deleted file mode 100644 index dfb40d8..0000000 --- a/pdfmajor/parser/PDFStream/exceptions.py +++ /dev/null @@ -1,16 +0,0 @@ -from ..PSStackParser import PSException - -class PDFException(PSException): - pass - -class PDFTypeError(PDFException): - pass - -class PDFValueError(PDFException): - pass - -class PDFObjectNotFound(PDFException): - pass - -class PDFNotImplementedError(PDFException): - pass \ No newline at end of file diff --git a/pdfmajor/parser/PDFStream/util.py b/pdfmajor/parser/PDFStream/util.py index 81db44a..eae568f 100644 --- a/pdfmajor/parser/PDFStream/util.py +++ b/pdfmajor/parser/PDFStream/util.py @@ -1,6 +1,5 @@ from .PDFObjRef import PDFObjRef from ...utils import settings, isnumber, int2byte -from .exceptions import PDFTypeError from logging import getLogger diff --git a/pdfmajor/parser/PSStackParser/__init__.py b/pdfmajor/parser/PSStackParser/__init__.py index e741357..e8b4d5c 100644 --- a/pdfmajor/parser/PSStackParser/__init__.py +++ b/pdfmajor/parser/PSStackParser/__init__.py @@ -7,7 +7,6 @@ from ...utils import choplist, settings from .PSBaseParser import PSBaseParser from .types import * -from .exceptions import * from .constants import * log = logging.getLogger(__name__) diff --git a/pdfmajor/parser/PSStackParser/exceptions.py b/pdfmajor/parser/PSStackParser/exceptions.py deleted file mode 100644 index 91025dc..0000000 --- a/pdfmajor/parser/PSStackParser/exceptions.py +++ /dev/null @@ -1,2 +0,0 @@ -## PS Exceptions -## diff --git a/pdfmajor/parser/exceptions.py b/pdfmajor/parser/exceptions.py deleted file mode 100644 index 87ad644..0000000 --- a/pdfmajor/parser/exceptions.py +++ /dev/null @@ -1,5 +0,0 @@ -from .cmapdb import CMapError -from .PDFStream.exceptions import * -from .PDFDocument.exceptions import * -from .PSStackParser.exceptions import * -from .PDFParser import PDFSyntaxError \ No newline at end of file