From: Rob Browning Date: Wed, 15 Mar 2017 04:05:14 +0000 (-0500) Subject: root-status: use print_function X-Git-Tag: 0.30~118 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=commitdiff_plain;h=af68a40c37f5ecdab081d17d60dad2e9cb6b5647 root-status: use print_function Python 3 requires it. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/t/root-status b/t/root-status index 4f21599..0c43e9d 100755 --- a/t/root-status +++ b/t/root-status @@ -5,6 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"} """ # end of bup preamble +from __future__ import print_function from sys import stderr import sys @@ -12,19 +13,20 @@ import sys if sys.platform.startswith('cygwin'): if sys.getwindowsversion()[0] > 5: # Sounds like the situation is much more complicated here - print >> stderr, "can't detect root status for OS version > 5; assuming not root" - print 'none' + print("can't detect root status for OS version > 5; assuming not root", + file=stderr) + print('none') import ctypes if ctypes.cdll.shell32.IsUserAnAdmin(): - print 'root' + print('root') else: - print 'none' + print('none') else: import os if os.environ.get('FAKEROOTKEY'): - print 'fake' + print('fake') else: if os.geteuid() == 0: - print 'root' + print('root') else: - print 'none' + print('none')