| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # SPDX-FileCopyrightText: 2020 Peter Bittner <[email protected]> |
||
| 12 | def confirm(message): |
||
| 13 | try: |
||
| 14 | answer = input('%s? ' % message) |
||
| 15 | return answer.strip().lower() in ['y', 'yes'] |
||
| 16 | except KeyboardInterrupt: |
||
| 17 | msg = 'Aborted by user.' |
||
| 18 | raise SystemExit(msg) |
||
| 19 | |||
| 52 |