Author: eallen
Date: 2010-07-13 13:50:59 -0400 (Tue, 13 Jul 2010)
New Revision: 4108
Modified:
mgmt/newdata/cumin/python/cumin/grid/negotiator.py
Log:
Use wrapper functions for partition and rpartition
Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-07-13 17:50:12 UTC (rev 4107)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-07-13 17:50:59 UTC (rev 4108)
@@ -13,6 +13,8 @@
from cumin.util import *
from cumin.widgets import *
+from parsley.stringex import partition, rpartition
+
from daemon import *
strings = StringCatalog(__file__)
@@ -230,7 +232,7 @@
def render_content(self, session, group):
# if a user
if "." in group:
- (g, sep, user) = group.rpartition(".")
+ (g, sep, user) = rpartition(group, ".")
return "<span style='padding-left:
1em;'>%s</span>" % user
return group
@@ -341,9 +343,9 @@
info = self.app.model.configs_by_negotiator[negotiator._qmf_agent_id]
siblings = list()
- (ng, s, nn) = node.rpartition(".")
+ (ng, s, nn) = rpartition(node, ".")
for group in info:
- (g, s, n) = group.rpartition(".")
+ (g, s, n) = rpartition(group, ".")
if g == ng:
siblings.append(group)
Show replies by date