| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
import argparse |
| 4 |
import platform |
| 5 |
|
| 6 |
parser = argparse.ArgumentParser() |
| 7 |
parser.add_argument("--my_arg", "-a") |
| 8 |
|
| 9 |
args = parser.parse_args() |
| 10 |
|
| 11 |
answer = (platform.system() == "Windows" and |
| 12 |
args.my_arg == "/dev/null" and "ERROR") or "OK" |
| 13 |
|
| 14 |
print(answer) |