oft: handle missing test module/class docstrings
diff --git a/oft b/oft
index 885b5b2..bfea291 100755
--- a/oft
+++ b/oft
@@ -471,16 +471,11 @@
print "\nTest List:"
for (modname, (mod, tests)) in test_modules.items():
mod_count += 1
- desc = mod.__doc__.strip()
- desc = desc.split('\n')[0]
+ desc = (mod.__doc__ or "No description").strip().split('\n')[0]
start_str = " Module " + mod.__name__ + ": "
print start_str + _space_to(22, start_str) + desc
for (testname, test) in tests.items():
- try:
- desc = test.__doc__.strip()
- desc = desc.split('\n')[0]
- except:
- desc = "No description"
+ desc = (test.__doc__ or "No description").strip().split('\n')[0]
if test_prio_get(test) < config["priority"]:
start_str = " * " + testname + ":"
else: