pld-builder.new: PLD_Builder/util.py Convert uuid to string.
arekm
arekm at pld-linux.org
Sun Jun 22 14:30:33 CEST 2008
Author: arekm Date: Sun Jun 22 12:30:33 2008 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
Convert uuid to string.
---- Files affected:
pld-builder.new/PLD_Builder:
util.py (1.8 -> 1.9)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/util.py
diff -u pld-builder.new/PLD_Builder/util.py:1.8 pld-builder.new/PLD_Builder/util.py:1.9
--- pld-builder.new/PLD_Builder/util.py:1.8 Sun Jun 22 14:26:32 2008
+++ pld-builder.new/PLD_Builder/util.py Sun Jun 22 14:30:28 2008
@@ -6,6 +6,9 @@
import log
import string
+def uuid_python():
+ return str(uuid_random())
+
def uuid_external():
f = os.popen("uuidgen 2>&1")
u = string.strip(f.read())
@@ -16,9 +19,11 @@
# uuid module available in python >= 2.5
try:
- from uuid import uuid4 as uuid
+ from uuid import uuid4 as uuid_random
except ImportError:
uuid = uuid_external
+else:
+ uuid = uuid_python
def pkg_name(nvr):
return re.match(r"(.+)-[^-]+-[^-]+", nvr).group(1)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/util.py?r1=1.8&r2=1.9&f=u
More information about the pld-cvs-commit
mailing list