summaryrefslogtreecommitdiff
blob: 8228c1765143f4e493a0a5abaa64ce1de9b8a630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -r -U2 pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py
--- pdfshuffler-0.6.0.orig/pdfshuffler/pdfshuffler.py	2012-04-28 21:15:17.000000000 +0700
+++ pdfshuffler-0.6.0/pdfshuffler/pdfshuffler.py	2015-01-11 02:10:02.952809411 +0600
@@ -72,5 +72,13 @@
 
 import poppler      #for the rendering of pdf pages
-from pyPdf import PdfFileWriter, PdfFileReader
+
+try:
+    from PyPDF2 import PdfFileWriter, PdfFileReader
+except ImportError:
+    try:
+        from pyPdf import PdfFileWriter, PdfFileReader
+    except ImportError:
+        print('Neither PyPDF2 nor pyPdf found')
+        sys.exit(1)
 
 from pdfshuffler_iconview import CellRendererImage