test cases/common/51 run target/fakeburner.py
raw| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | |
| 4 | import sys |
| 5 | |
| 6 | plain_arg = sys.argv[1] |
| 7 | _, filename, _ = plain_arg.split(':') |
| 8 | try: |
| 9 | with open(filename, 'rb') as f: |
| 10 | content = f.read() |
| 11 | except FileNotFoundError: |
| 12 | print('Could not open file. Missing dependency?') |
| 13 | sys.exit(1) |
| 14 | print('File opened, pretending to send it somewhere.') |
| 15 | print(len(content), 'bytes uploaded') |