mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-25 02:33:15 -04:00
quickfix to disallow running borg with assertions switched off
Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in>
This commit is contained in:
parent
8e6dc52a8a
commit
7cf8316099
1 changed files with 9 additions and 0 deletions
|
|
@ -3,6 +3,15 @@
|
|||
import sys
|
||||
import traceback
|
||||
|
||||
# quickfix to disallow running borg with assertions switched off
|
||||
try:
|
||||
assert False
|
||||
except AssertionError:
|
||||
pass # OK
|
||||
else:
|
||||
print("Borg requires working assertions. Please run Python without -O and/or unset PYTHONOPTIMIZE.", file=sys.stderr)
|
||||
sys.exit(2) # == EXIT_ERROR
|
||||
|
||||
try:
|
||||
import argparse
|
||||
import collections
|
||||
|
|
|
|||
Loading…
Reference in a new issue