OLD | NEW |
1 import os | 1 import os |
2 import sys | 2 import sys |
3 import subprocess | 3 import subprocess |
4 | 4 |
5 | 5 |
6 def main(argv): | 6 def main(argv): |
7 cwd = os.getcwd() | 7 cwd = os.getcwd() |
8 subprocess_env = os.environ.copy() | 8 subprocess_env = os.environ.copy() |
9 subprocess_args = [] | 9 subprocess_args = [] |
10 for arg in argv: | 10 for arg in argv: |
(...skipping 18 matching lines...) Expand all Loading... |
29 process.communicate() | 29 process.communicate() |
30 return process.returncode | 30 return process.returncode |
31 | 31 |
32 | 32 |
33 if '__main__' == __name__: | 33 if '__main__' == __name__: |
34 try: | 34 try: |
35 sys.exit(main(sys.argv[1:])) | 35 sys.exit(main(sys.argv[1:])) |
36 except KeyboardInterrupt: | 36 except KeyboardInterrupt: |
37 sys.stderr.write('interrupted\n') | 37 sys.stderr.write('interrupted\n') |
38 sys.exit(1) | 38 sys.exit(1) |
OLD | NEW |