diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-15 18:35:41 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-15 18:35:41 -0500 |
commit | 03011f286420d8e091052019ee41eba021041e61 (patch) | |
tree | fcf389e28c1142d61015bf37134925d4b209ba25 /libbe/cmdutil.py | |
parent | 137f084f2931a0e2e1fa3076beadac17b88ef6b6 (diff) | |
download | bugseverywhere-03011f286420d8e091052019ee41eba021041e61.tar.gz |
Moved libbe.cmdutil.bug_summary() to libbe.bug.Bug.string().
This seems like a natual place for a function that only operates on Bugs.
Diffstat (limited to 'libbe/cmdutil.py')
-rw-r--r-- | libbe/cmdutil.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index 69cfe84..b5a93c7 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -72,29 +72,6 @@ def get_bug(spec, bug_dir=None): raise UserError("No bug matches %s" % spec) return matches[0] -def bug_summary(bug, bugs, no_target=False, shortlist=False): - info = [("ID", bug.uuid), - ("Short name", unique_name(bug, bugs)), - ("Severity", bug.severity), - ("Status", bug.status), - ("Assigned", bug.assigned), - ("Target", bug.target), - ("Creator", bug.creator), - ("Created", "%s (%s)" % (utility.handy_time(bug.time),utility.time_to_str(bug.time)))] - newinfo = [] - for k,v in info: - if v == None: - newinfo.append((k,"")) - else: - newinfo.append((k,v)) - info = newinfo - if shortlist == False: - longest_key_len = max([len(k) for k,v in info]) - infolines = [" %*s : %s\n" % (longest_key_len,k,v) for k,v in info] - return "".join(infolines) + "%s\n" % bug.summary - else: - return "%s: %s\n" % (unique_name(bug, bugs), bug.summary) - def iter_commands(): for name, module in plugin.iter_plugins("becommands"): yield name.replace("_", "-"), module |