Mercurial > libervia-pubsub
diff idavoll/backend.py @ 168:e2c2c2baf483
Fix use of uuid module now shipping with Python 2.5.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Wed, 03 Oct 2007 19:07:50 +0000 |
parents | ef22e4150caa |
children | 96afb248df5e |
line wrap: on
line diff
--- a/idavoll/backend.py Wed Oct 03 12:41:43 2007 +0000 +++ b/idavoll/backend.py Wed Oct 03 19:07:50 2007 +0000 @@ -108,7 +108,7 @@ if persist_items or deliver_payloads: for item in items: if not item.getAttribute("id"): - item["id"] = uuid.generate() + item["id"] = str(uuid.uuid4()) if persist_items: d = node.store_items(items, requestor) @@ -186,7 +186,7 @@ def create_node(self, node_id, requestor): if not node_id: - node_id = 'generic/%s' % uuid.generate() + node_id = 'generic/%s' % uuid.uuid4() d = self.storage.create_node(node_id, requestor) d.addCallback(lambda _: node_id) return d