Skip to content

Commit b4d75a7

Browse files
committed
Raise ImportErrors
1 parent de3a566 commit b4d75a7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

getpdftitle.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
try:
1313
import argparse
1414
except ImportError:
15-
print('ERROR: Ensure python module argparse is installed for Python 3')
16-
exit(-1)
15+
raise ImportError('Ensure python module argparse is installed for Python 3')
1716
try:
1817
from pdfrw import PdfReader
1918
except ImportError:
20-
print('ERROR: Ensure python module pdfrw is installed for Python 3')
21-
exit(-1)
19+
raise ImportError('Ensure python module pdfrw is installed for Python 3')
2220

2321

2422
def get_raw_title(filename):

0 commit comments

Comments
 (0)