aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/names.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-03-09 19:32:17 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-03-09 19:32:17 +0000
commit006b0cb118041cac8081032ad2d401fdd69fe6ae (patch)
treee8dd9b0d65d0ce3ca842cd279ba3edc724416e8e /libbe/names.py
parent6ade356915dc78cae448b8b48028659ee0528244 (diff)
downloadbugseverywhere-006b0cb118041cac8081032ad2d401fdd69fe6ae.tar.gz
Added ability to create, close, open bugs
Diffstat (limited to 'libbe/names.py')
-rw-r--r--libbe/names.py22
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)
+
+