Skip to content

Commit

Permalink
Watchmedo: Handle all available signals
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Mar 24, 2019
1 parent 8b94506 commit 3f687c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/gorakhargosh/watchdog/compare/v0.8.3...v0.9.0>`_ - 2018-08-28
Expand Down
3 changes: 1 addition & 2 deletions src/watchdog/watchmedo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3f687c6

Please sign in to comment.