[CMF-checkins] CVS: CMF/CMFCore - SkinsTool.py:1.20.2.1
Yvo Schubbe
schubbe@web.de
Sat, 11 Jan 2003 09:35:20 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv8540/CMFCore
Modified Files:
Tag: yuppie-buglets1-branch
SkinsTool.py
Log Message:
cleanup:
- fixed docstring (Collector #80)
- replaced string function
- updated copyright statement
=== CMF/CMFCore/SkinsTool.py 1.20 => 1.20.2.1 ===
--- CMF/CMFCore/SkinsTool.py:1.20 Mon Jan 6 15:37:06 2003
+++ CMF/CMFCore/SkinsTool.py Sat Jan 11 09:35:17 2003
@@ -1,24 +1,25 @@
##############################################################################
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+# Copyright (c) 2001-2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""Portal skins tool.
$Id$
"""
-from string import split
from utils import UniqueObject, getToolByName, _dtmldir
-import Globals
-from Globals import DTMLFile, PersistentMapping
+from Globals import DTMLFile
+from Globals import InitializeClass
+from Globals import PersistentMapping
from SkinsContainer import SkinsContainer
from Acquisition import aq_base
from DateTime import DateTime
@@ -158,7 +159,7 @@
an object of the appropriate type (or None, if we don't
know what to do).
"""
- major, minor = split( typ, '/' )
+ major, minor = typ.split('/', 1)
if major == 'image':
return Image( id=name
@@ -185,9 +186,8 @@
security.declarePrivate('testSkinPath')
def testSkinPath(self, p):
- '''
- Calls SkinsContainer.getSkinByName().
- '''
+ """ Calls SkinsContainer.getSkinByPath().
+ """
self.getSkinByPath(p, raise_exc=1)
#
@@ -309,4 +309,4 @@
if make_default:
self.default_skin = skinname
-Globals.InitializeClass(SkinsTool)
+InitializeClass(SkinsTool)