Check if altsep exists before replace.

llvm-svn: 242576
This commit is contained in:
Chaoren Lin 2015-07-17 21:40:11 +00:00
parent f355eda567
commit 636a0e3836
1 changed files with 2 additions and 1 deletions

View 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: