]> xenbits.xensource.com Git - people/larsk/xenproject-org-gitdm.git/commitdiff
Use os.path.join() to prepend the directory name
authorJonathan Corbet <corbet@lwn.net>
Thu, 22 Jul 2010 20:43:43 +0000 (14:43 -0600)
committerJonathan Corbet <corbet@lwn.net>
Thu, 22 Jul 2010 20:43:43 +0000 (14:43 -0600)
...that way we get the right result regardless of whether slashes have been
provided.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
ConfigFile.py

index 1fc8823c062d4b20f086489519e1a766b18a5b95..4b7a9ce94c0a58401f6a51ca6be6cfef66f665ad 100644 (file)
@@ -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)