summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2010-07-22 14:43:43 -0600
committerJonathan Corbet <corbet@lwn.net>2010-07-22 14:43:43 -0600
commitea23ca50c0d3ba5e51a5d00c4811b99b889a521a (patch)
tree6bdc57017f7a4bc2c7527280ce839a7dd1d7be3e
parent6ec7bdaa0f271cb205e69f9dd444dced14aa5083 (diff)
Use os.path.join() to prepend the directory name
...that way we get the right result regardless of whether slashes have been provided. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--ConfigFile.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ConfigFile.py b/ConfigFile.py
index 1fc8823..4b7a9ce 100644
--- a/ConfigFile.py
+++ b/ConfigFile.py
@@ -4,13 +4,13 @@
#
# This code is part of the LWN git data miner.
#
-# Copyright 2007-8 LWN.net
-# Copyright 2007-8 Jonathan Corbet <corbet@lwn.net>
+# Copyright 2007-10 LWN.net
+# Copyright 2007-10 Jonathan Corbet <corbet@lwn.net>
#
# This file may be distributed under the terms of the GNU General
# Public License, version 2.
#
-import sys, re, datetime
+import sys, re, datetime, os.path
import database
#
@@ -107,13 +107,13 @@ def ConfigFile (name, confdir):
if len (sline) < 2:
croak ('Funky config line: "%s"' % (line))
if sline[0] == 'EmailAliases':
- ReadEmailAliases (confdir + sline[1])
+ ReadEmailAliases (os.path.join (confdir, sline[1]))
elif sline[0] == 'EmailMap':
- ReadEmailEmployers (confdir + sline[1])
+ ReadEmailEmployers (os.path.join (confdir, sline[1]))
elif sline[0] == 'GroupMap':
if len (sline) != 3:
croak ('Funky group map line "%s"' % (line))
- ReadGroupMap (confdir + sline[1], sline[2])
+ ReadGroupMap (os.path.join (confdir, sline[1]), sline[2])
else:
croak ('Unrecognized config line: "%s"' % (line))
line = ReadConfigLine (file)