| LEFT | RIGHT |
| (no file at all) | |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # coding: utf-8 | 2 # coding: utf-8 |
| 3 | 3 |
| 4 import os, sys, subprocess, tempfile; | 4 import os, sys, subprocess, tempfile; |
| 5 baseDir = os.path.abspath(os.path.dirname(__file__)) | 5 baseDir = os.path.abspath(os.path.dirname(__file__)) |
| 6 | 6 |
| 7 def check_curl(): | 7 def check_curl(): |
| 8 buildDir = os.path.join(baseDir, 'build') | 8 buildDir = os.path.join(baseDir, 'build') |
| 9 if not os.path.exists(buildDir): | 9 if not os.path.exists(buildDir): |
| 10 os.makedirs(buildDir); | 10 os.makedirs(buildDir); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 # call failed, curl not available | 24 # call failed, curl not available |
| 25 sys.stdout.write('0') | 25 sys.stdout.write('0') |
| 26 else: | 26 else: |
| 27 # call succeeded, curl can be used | 27 # call succeeded, curl can be used |
| 28 sys.stdout.write('1') | 28 sys.stdout.write('1') |
| 29 finally: | 29 finally: |
| 30 os.remove(name) | 30 os.remove(name) |
| 31 | 31 |
| 32 if __name__ == '__main__': | 32 if __name__ == '__main__': |
| 33 check_curl() | 33 check_curl() |
| LEFT | RIGHT |