]> arthur.barton.de Git - bup.git/blobdiff - main.py
Handle commit mergetags (at all)
[bup.git] / main.py
diff --git a/main.py b/main.py
index 19675cd109e897e31fd718452ce21e3dc1e9daab..c0679e32919fa0a6b721ce70bd4eed8add70dcc4 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -5,9 +5,15 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 import errno, re, sys, os, subprocess, signal, getopt
 
+if sys.version_info[0] != 2 \
+   and not os.environ.get('BUP_ALLOW_UNEXPECTED_PYTHON_VERSION') == 'true':
+    print('error: bup may crash with python versions other than 2, or eat your data',
+          file=sys.stderr)
+    sys.exit(2)
+
 from subprocess import PIPE
 from sys import stderr, stdout
 import select