mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Use *args inside FAIL and SKIP so that it is possible to call these functions
with multiple arguments, printf style. This is already being done in some cases (causing an exception of course). Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
1bac3b49cd
commit
98009c2ad0
1 file changed
+4
-4
@@ -131,12 +131,12 @@ def becomeNonRoot():
|
||||
if os.geteuid() == 0:
|
||||
FAIL("Could not become a non-root user")
|
||||
|
||||
def FAIL(reason):
|
||||
print "\nREASON: %s" % reason
|
||||
def FAIL(format, *args):
|
||||
print "\nREASON:", (format % args)
|
||||
sys.exit(TEST_FAIL)
|
||||
|
||||
def SKIP(reason):
|
||||
print "\nREASON: %s" % reason
|
||||
def SKIP(format, *args):
|
||||
print "\nREASON:", (format % args)
|
||||
sys.exit(TEST_SKIP)
|
||||
|
||||
def saveLog(logText, filename=None):
|
||||
|
||||