[CMF-checkins] CVS: CMF - utils.py:1.6
shane@digicool.com
shane@digicool.com
Sat, 7 Apr 2001 18:56:49 -0400 (EDT)
Update of /cvs-repository/CMF/CMFCore
In directory korak:/tmp/cvs-serv6602
Modified Files:
utils.py
Log Message:
- Added a forgotten import of string.split.
- Fixed the URL of icons created through registerIcon().
--- Updated File utils.py in package CMF --
--- utils.py 2001/03/01 22:43:38 1.5
+++ utils.py 2001/04/07 22:56:47 1.6
@@ -89,9 +89,12 @@
from AccessControl.Role import gather_permissions
import Globals
from Acquisition import aq_get, aq_inner, aq_parent
+from string import split
+
try: from OFS.ObjectManager import UNIQUE
except ImportError: UNIQUE = 2
+
# Tool for getting at Tools, meant to be modified as policies or Tool
# implementations change without having to affect the consumer.
@@ -460,7 +463,7 @@
def registerIcon(klass, iconspec, _prefix=None):
modname = klass.__module__
- pid = modname[1]
+ pid = split(modname, '.')[1]
name = path.split(iconspec)[1]
klass.icon = 'misc_/%s/%s' % (pid, name)
icon = Globals.ImageFile(iconspec, _prefix)