[Zodb-checkins] CVS: Zope/lib/python/ZEO - util.py:1.5
Fred L. Drake, Jr.
fred@zope.com
Tue, 11 Feb 2003 12:08:20 -0500
Update of /cvs-repository/Zope/lib/python/ZEO
In directory cvs.zope.org:/tmp/cvs-serv20010
Modified Files:
util.py
Log Message:
- fix up a docstring
- minor cleanup
=== Zope/lib/python/ZEO/util.py 1.4 => 1.5 ===
--- Zope/lib/python/ZEO/util.py:1.4 Tue Oct 8 15:35:09 2002
+++ Zope/lib/python/ZEO/util.py Tue Feb 11 12:08:19 2003
@@ -8,7 +8,7 @@
# 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
+# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Utilities for setting up the server environment."""
@@ -16,10 +16,10 @@
import os
def parentdir(p, n=1):
- """Return the parent of p, n levels up."""
+ """Return the ancestor of p from n levels up."""
d = p
while n:
- d = os.path.split(d)[0]
+ d = os.path.dirname(d)
if not d or d == '.':
d = os.getcwd()
n -= 1