Check if altsep exists before replace.
authorChaoren Lin <chaorenl@google.com>
Fri, 17 Jul 2015 21:40:11 +0000 (21:40 +0000)
committerChaoren Lin <chaorenl@google.com>
Fri, 17 Jul 2015 21:40:11 +0000 (21:40 +0000)
llvm-svn: 242576

lldb/test/lldbtest.py

index 66c69f9..c3deee9 100644 (file)
@@ -1651,7 +1651,8 @@ class Base(unittest2.TestCase):
 
         if compiler[1] == ':':
             compiler = compiler[2:]
-        compiler = compiler.replace(os.path.altsep, os.path.sep)
+        if os.path.altsep is not None:
+            compiler = compiler.replace(os.path.altsep, os.path.sep)
 
         fname = "{}-{}-{}".format(self.id(), self.getArchitecture(), "_".join(compiler.split(os.path.sep)))
         if len(fname) > 200: