Update handlers.py

Facing error invalid literal for int with base 10 at line 85 and 87. Hence converted to float and then int.
pull/236/head
nayakshrey 2021-04-20 15:50:27 +05:30 committed by GitHub
parent 7709e58d64
commit e3ddf8281d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -82,9 +82,9 @@ class PDFHandler(object):
a, b = r.split("-")
if b == "end":
b = infile.getNumPages()
page_numbers.append({"start": int(a), "end": int(b)})
page_numbers.append({"start": int(float(a)), "end": int(float(b))})
else:
page_numbers.append({"start": int(r), "end": int(r)})
page_numbers.append({"start": int(float(r)), "end": int(float(r))})
instream.close()
P = []
for p in page_numbers: