Commit 6b0cefb8 authored by Fred Drake's avatar Fred Drake

- fix up a docstring

- minor cleanup
parent 508b64b8
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment