about summary refs log tree commit diff
path: root/kindlecomicconverter/pdfjpgextract.py
diff options
context:
space:
mode:
Diffstat (limited to 'kindlecomicconverter/pdfjpgextract.py')
-rw-r--r--kindlecomicconverter/pdfjpgextract.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/kindlecomicconverter/pdfjpgextract.py b/kindlecomicconverter/pdfjpgextract.py
index 90d0643..0889eda 100644
--- a/kindlecomicconverter/pdfjpgextract.py
+++ b/kindlecomicconverter/pdfjpgextract.py
@@ -25,17 +25,16 @@ from string import ascii_uppercase, digits
 
 
 class PdfJpgExtract:
-    def __init__(self, origFileName):
-        self.origFileName = origFileName
-        self.filename = os.path.splitext(origFileName)
-        # noinspection PyUnusedLocal
-        self.path = self.filename[0] + "-KCC-" + ''.join(choice(ascii_uppercase + digits) for x in range(3))
+    def __init__(self, fname):
+        self.fname = fname
+        self.filename = os.path.splitext(fname)
+        self.path = self.filename[0] + "-KCC-" + ''.join(choice(ascii_uppercase + digits) for _ in range(3))
 
     def getPath(self):
         return self.path
 
     def extract(self):
-        pdf = open(self.origFileName, "rb").read()
+        pdf = open(self.fname, "rb").read()
         startmark = b"\xff\xd8"
         startfix = 0
         endmark = b"\xff\xd9"