fix error handling to be more useful when symlinking fails.
Signed-off-by: Martin J. Bligh <[email protected]>
Index: bin/base_sysinfo.py
===================================================================
--- bin/base_sysinfo.py (revision 4325)
+++ bin/base_sysinfo.py (working copy)
@@ -252,10 +252,13 @@
reboot_dir = self._get_boot_subdir()
assert os.path.exists(reboot_dir)
symlink_dest = os.path.join(test_sysinfodir, "reboot_current")
- os.symlink(
- # create a relative symlink
- utils.get_relative_path(reboot_dir, os.path.dirname(symlink_dest)),
- symlink_dest)
+ symlink_src = utils.get_relative_path(reboot_dir,
+ os.path.dirname(symlink_dest))
+ try:
+ os.symlink(symlink_src, symlink_dest)
+ except Exception, e:
+ raise Exception, '%s: whilst linking %s to %s' % (e, symlink_src,
+ symlink_dest)
# run all the standard logging commands
for log in self.test_loggables:
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest