helpers: fix missing call to complain()

In practice this is probably unreachable.
This commit is contained in:
James R. Barlow
2018-04-25 21:57:50 -07:00
parent d761d80750
commit 11cd6201d9
+3 -2
View File
@@ -22,6 +22,7 @@ from pathlib import Path
import sys
import os
import multiprocessing
import warnings
def re_symlink(input_file, soft_link_name, log=None):
@@ -70,7 +71,7 @@ def is_iterable_notstr(thing):
def page_number(input_file):
"Get one-based page number implied by filename (000002.pdf -> 2)"
return int(os.path.basename(input_file)[0:6])
return int(os.path.basename(fspath(input_file)[0:6]))
def available_cpu_count():
@@ -85,7 +86,7 @@ def available_cpu_count():
except (ImportError, AttributeError):
pass
complain(
warnings.warn(
"Could not get CPU count. Assuming one (1) CPU."
"Use -j N to set manually.")
return 1