diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-09 19:32:17 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-09 19:32:17 +0000 |
commit | 006b0cb118041cac8081032ad2d401fdd69fe6ae (patch) | |
tree | e8dd9b0d65d0ce3ca842cd279ba3edc724416e8e /libbe/names.py | |
parent | 6ade356915dc78cae448b8b48028659ee0528244 (diff) | |
download | bugseverywhere-006b0cb118041cac8081032ad2d401fdd69fe6ae.tar.gz |
Added ability to create, close, open bugs
Diffstat (limited to 'libbe/names.py')
-rw-r--r-- | libbe/names.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libbe/names.py b/libbe/names.py new file mode 100644 index 0000000..a0c579b --- /dev/null +++ b/libbe/names.py @@ -0,0 +1,22 @@ +import commands +import os + +def uuid(): + return commands.getoutput('uuidgen') + +def creator(): + return os.environ["LOGNAME"] + +def friendly_name(bugs, ctor): + last = 0 + for bug in bugs: + name = bug.name + if name is None: + continue + if name.startswith(ctor): + num = int(name.split("-")[-1]) + if num > last: + last = num + return "%s-%i" % (ctor, num+1) + + |