| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 3 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 # Prepares a raspbian image to support fletch. We use qemu to edit the image | 8 # Prepares a raspbian image to support fletch. We use qemu to edit the image |
| 9 # since this allows us to run commands and push data to the image without using | 9 # since this allows us to run commands and push data to the image without using |
| 10 # sudo. This script will "edit" the image in place, so take a copy before using. | 10 # sudo. This script will "edit" the image in place, so take a copy before using. |
| 11 | 11 |
| 12 import optparse | 12 import optparse |
| 13 import os | 13 import os |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 # The process did not shut down, kill it | 172 # The process did not shut down, kill it |
| 173 print 'Qemu did not shut down nicely, killing it' | 173 print 'Qemu did not shut down nicely, killing it' |
| 174 self.process.terminate(force=True) | 174 self.process.terminate(force=True) |
| 175 self.process.read() | 175 self.process.read() |
| 176 self.logfile.close() | 176 self.logfile.close() |
| 177 # We should actually throw here, but since we can't nicely shut down we | 177 # We should actually throw here, but since we can't nicely shut down we |
| 178 # allow this for now, see issue 277 | 178 # allow this for now, see issue 277 |
| 179 | 179 |
| 180 if __name__ == '__main__': | 180 if __name__ == '__main__': |
| 181 sys.exit(Main()) | 181 sys.exit(Main()) |
| OLD | NEW |