@@ -933,7 +933,7 @@ def getLinkDict(ln, document=None) -> dict:
933
933
nl ["from" ] = ln .rect
934
934
except Exception :
935
935
# This seems to happen quite often in PyMuPDF/tests.
936
- if g_exceptions_verbose : pymupdf .exception_info ()
936
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
937
937
pass
938
938
pnt = pymupdf .Point (0 , 0 )
939
939
if dest .flags & pymupdf .LINK_FLAG_L_VALID :
@@ -1444,46 +1444,46 @@ def set_toc(
1444
1444
txt += ol ["dest" ]
1445
1445
except Exception :
1446
1446
# Verbose in PyMuPDF/tests.
1447
- if g_exceptions_verbose : pymupdf .exception_info ()
1447
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1448
1448
pass
1449
1449
try :
1450
1450
if ol ["first" ] > - 1 :
1451
1451
txt += "/First %i 0 R" % xref [ol ["first" ]]
1452
1452
except Exception :
1453
- if g_exceptions_verbose : pymupdf .exception_info ()
1453
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1454
1454
pass
1455
1455
try :
1456
1456
if ol ["last" ] > - 1 :
1457
1457
txt += "/Last %i 0 R" % xref [ol ["last" ]]
1458
1458
except Exception :
1459
- if g_exceptions_verbose : pymupdf .exception_info ()
1459
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1460
1460
pass
1461
1461
try :
1462
1462
if ol ["next" ] > - 1 :
1463
1463
txt += "/Next %i 0 R" % xref [ol ["next" ]]
1464
1464
except Exception :
1465
1465
# Verbose in PyMuPDF/tests.
1466
- if g_exceptions_verbose : pymupdf .exception_info ()
1466
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1467
1467
pass
1468
1468
try :
1469
1469
if ol ["parent" ] > - 1 :
1470
1470
txt += "/Parent %i 0 R" % xref [ol ["parent" ]]
1471
1471
except Exception :
1472
1472
# Verbose in PyMuPDF/tests.
1473
- if g_exceptions_verbose : pymupdf .exception_info ()
1473
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1474
1474
pass
1475
1475
try :
1476
1476
if ol ["prev" ] > - 1 :
1477
1477
txt += "/Prev %i 0 R" % xref [ol ["prev" ]]
1478
1478
except Exception :
1479
1479
# Verbose in PyMuPDF/tests.
1480
- if g_exceptions_verbose : pymupdf .exception_info ()
1480
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1481
1481
pass
1482
1482
try :
1483
1483
txt += "/Title" + ol ["title" ]
1484
1484
except Exception :
1485
1485
# Verbose in PyMuPDF/tests.
1486
- if g_exceptions_verbose : pymupdf .exception_info ()
1486
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
1487
1487
pass
1488
1488
1489
1489
if ol .get ("color" ) and len (ol ["color" ]) == 3 :
@@ -4686,8 +4686,7 @@ def output_justify(start, line):
4686
4686
try :
4687
4687
line , tl = new_lines .pop (0 )
4688
4688
except IndexError :
4689
- # Verbose in PyMuPDF/tests.
4690
- if g_exceptions_verbose : pymupdf .exception_info ()
4689
+ if g_exceptions_verbose >= 2 : pymupdf .exception_info ()
4691
4690
break
4692
4691
4693
4692
if right_to_left : # Arabic, Hebrew
0 commit comments