diff --git a/changelog.rst b/changelog.rst index b71bd0e96..0d7f95ffd 100644 --- a/changelog.rst +++ b/changelog.rst @@ -29,6 +29,7 @@ API changes - Identify synthesized events with ``is_synthetic`` attribute. - Refactored tests to use pytest. - General code clean-up. +- Watchmedo: Handle all available signals. `0.9.0 `_ - 2018-08-28 diff --git a/src/watchdog/watchmedo.py b/src/watchdog/watchmedo.py index 2aaffa5e8..81028b7ea 100755 --- a/src/watchdog/watchmedo.py +++ b/src/watchdog/watchmedo.py @@ -525,13 +525,12 @@ def auto_restart(args): from watchdog.tricks import AutoRestartTrick import signal - import re if not args.directories: args.directories = ['.'] # Allow either signal name or number. - if re.match('^SIG[A-Z]+$', args.signal): + if args.signal.startswith("SIG"): stop_signal = getattr(signal, args.signal) else: stop_signal = int(args.signal)