
Summary: This reverts commit r328596. Checking if the arguments are strings before testing if they contain "/dev/null". Reviewers: rnk Reviewed By: rnk Subscribers: delcypher, llvm-commits Differential Revision: https://reviews.llvm.org/D44914 llvm-svn: 328603
15 lines
276 B
Python
15 lines
276 B
Python
#!/usr/bin/env python
|
|
|
|
import argparse
|
|
import platform
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--my_arg", "-a")
|
|
|
|
args = parser.parse_args()
|
|
|
|
answer = (platform.system() == "Windows" and
|
|
args.my_arg == "/dev/null" and "ERROR") or "OK"
|
|
|
|
print(answer)
|