Skip to content

Commit

Permalink
workaround for that strange Host = None issue, will screw up on some …
Browse files Browse the repository at this point in the history
…Windows systems (CYGWIN and gcc)
  • Loading branch information
mikanystrom-intel committed May 29, 2018
1 parent 6f9d71c commit e3ec872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/python/pylib.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def GetVersion(Key):
TargetOS = "WIN32"
HAVE_SERIAL = True

if Host.endswith("_NT") or Host == "NT386":
if Host != None and (Host.endswith("_NT") or Host == "NT386"):
Q = "" # q for quote: This is probably about the host, not the target.

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -2221,7 +2221,7 @@ def SetVisualCPlusPlus2015OrNewer():
#sys.exit(3)

def IsCygwinHostTarget(): # confused
return Host.endswith("_CYGWIN") or (Host == "NT386" and GCC_BACKEND and TargetOS == "POSIX")
return Host!= None and (Host.endswith("_CYGWIN") or (Host == "NT386" and GCC_BACKEND and TargetOS == "POSIX"))

def IsMinGWHostTarget():
return (Target == "NT386" and GCC_BACKEND and TargetOS == "WIN32") or Target.endswith("_MINGW")
Expand Down

0 comments on commit e3ec872

Please sign in to comment.