diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/formatRefs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/formatRefs.py b/tools/formatRefs.py index 8189f2d..2cd2f9a 100755 --- a/tools/formatRefs.py +++ b/tools/formatRefs.py @@ -54,7 +54,10 @@ def formatParent (s, g, n, useName = True): start = first (g.objects (n, s.pageStart)) end = first (g.objects (n, s.pageEnd)) if start: - num = int (end)-int (start) + try: + num = int (end)-int (start) + except ValueError: + num = 1 if end and num >= 1: ret.append ('pp. {}–{}'.format (start, end)) else: |