(flag_file, environ, debug=False, stream=sys.stderr)
| 135 | |
| 136 | |
| 137 | def run_dry_run(flag_file, environ, debug=False, stream=sys.stderr): |
| 138 | flag_enabled = os.path.isfile(flag_file) |
| 139 | urls = collect_notify_urls(environ) |
| 140 | results = validate_notify_urls(urls) |
| 141 | ok = flag_enabled and bool(urls) and all(accepted for _url, accepted, _reason in results) |
| 142 | if debug: |
| 143 | write_debug(stream, flag_enabled, urls, results) |
| 144 | return 0 if ok else 1 |
| 145 | |
| 146 | |
| 147 | def send_notifications(urls, title, body, notify_type): |
no test coverage detected