Use find() method on string to run on both Python 2 and 3

This commit is contained in:
Pavol Klacansky
2015-10-03 11:56:00 +00:00
parent 1d08598f6e
commit 41199179de

View File

@@ -1,7 +1,6 @@
#!/usr/bin/python
import sys
import string
import re
import subprocess
import platform
@@ -22,7 +21,7 @@ target = re.sub("\.c$", "", target)
target = re.sub("-", "_", target)
llvm_as="llvm-as"
if platform.system() == 'Windows' or string.find(platform.system(), "CYGWIN_NT") != -1:
if platform.system() == 'Windows' or platform.system().find("CYGWIN_NT") != -1:
llvm_as = os.getenv("LLVM_INSTALL_DIR").replace("\\", "/") + "/bin/" + llvm_as
try: