From: jlgijsbers Date: Sat, 25 Oct 2003 11:20:17 +0000 (+0000) Subject: Use abspath() from os.path, it's been there since 1.5.2. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c4b07ad5d1c88b1fabc83215ab26893a1d9ef7d1;p=roundup.git Use abspath() from os.path, it's been there since 1.5.2. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1936 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/scripts/roundup_server.py b/roundup/scripts/roundup_server.py index be5e569..97b6a5d 100644 --- a/roundup/scripts/roundup_server.py +++ b/roundup/scripts/roundup_server.py @@ -16,7 +16,7 @@ # """ HTTP Server that serves roundup. -$Id: roundup_server.py,v 1.29 2003-10-10 00:40:16 richard Exp $ +$Id: roundup_server.py,v 1.30 2003-10-25 11:20:17 jlgijsbers Exp $ """ # python version check @@ -263,15 +263,6 @@ def daemonize(pidfile): os.dup2(devnull, 1) os.dup2(devnull, 2) -def abspath(path): - ''' Make the given path an absolute path. - - Code from Zope-Coders posting of 2002-10-06 by GvR. - ''' - if not os.path.isabs(path): - path = os.path.join(os.getcwd(), path) - return os.path.normpath(path) - def run(): ''' Script entry point - handle args and figure out what to to. ''' @@ -298,8 +289,8 @@ def run(): elif opt == '-p': port = int(arg) elif opt == '-u': user = arg elif opt == '-g': group = arg - elif opt == '-d': pidfile = abspath(arg) - elif opt == '-l': logfile = abspath(arg) + elif opt == '-d': pidfile = os.path.abspath(arg) + elif opt == '-l': logfile = os.path.abspath(arg) elif opt == '-h': usage() elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0