Skip to content

Commit 6ce7e7c

Browse files
author
Johannes Gijsbers
committed
Use abspath() from os.path, it's been there since 1.5.2.
1 parent 1027d04 commit 6ce7e7c

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

roundup/scripts/roundup_server.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.29 2003-10-10 00:40:16 richard Exp $
19+
$Id: roundup_server.py,v 1.30 2003-10-25 11:20:17 jlgijsbers Exp $
2020
"""
2121

2222
# python version check
@@ -263,15 +263,6 @@ def daemonize(pidfile):
263263
os.dup2(devnull, 1)
264264
os.dup2(devnull, 2)
265265

266-
def abspath(path):
267-
''' Make the given path an absolute path.
268-
269-
Code from Zope-Coders posting of 2002-10-06 by GvR.
270-
'''
271-
if not os.path.isabs(path):
272-
path = os.path.join(os.getcwd(), path)
273-
return os.path.normpath(path)
274-
275266
def run():
276267
''' Script entry point - handle args and figure out what to to.
277268
'''
@@ -298,8 +289,8 @@ def run():
298289
elif opt == '-p': port = int(arg)
299290
elif opt == '-u': user = arg
300291
elif opt == '-g': group = arg
301-
elif opt == '-d': pidfile = abspath(arg)
302-
elif opt == '-l': logfile = abspath(arg)
292+
elif opt == '-d': pidfile = os.path.abspath(arg)
293+
elif opt == '-l': logfile = os.path.abspath(arg)
303294
elif opt == '-h': usage()
304295
elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0
305296

0 commit comments

Comments
 (0)