[PATCH 1/2] TESTS: fix error when rebootscript defined but not rebootargs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: J. Bruce Fields <bfields@xxxxxxxxxx>

Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
---
 lib/nfs4/servertests/st_reboot.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/nfs4/servertests/st_reboot.py b/lib/nfs4/servertests/st_reboot.py
index f924716..4828cb8 100644
--- a/lib/nfs4/servertests/st_reboot.py
+++ b/lib/nfs4/servertests/st_reboot.py
@@ -39,8 +39,10 @@ def _waitForReboot(c):
         sys.stdin.readline()
         print "Continuing with test"
     else:
-        # Invoke the reboot script, passing it rebootargs as an argument.
-        os.system(c.opts.rebootscript + ' ' + c.opts.rebootargs)
+        args = c.opts.rebootscript
+        if c.opts.rebootargs:
+            c.opts.rebootscript += ' ' + c.opts.rebootargs
+        os.system(args)
 
         # Wait until the server is back up.
         # c.null() blocks until it gets a response,
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux