Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from drxzcl/master
Browse files Browse the repository at this point in the history
Don't fail when signals are not implemented.
  • Loading branch information
whtsky authored Jun 15, 2016
2 parents 9462486 + 9a8fd4e commit 7d8cf7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion maga.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def run(self, port=6881):
transport, _ = self.loop.run_until_complete(coro)

for signame in ('SIGINT', 'SIGTERM'):
self.loop.add_signal_handler(getattr(signal, signame), self.stop)
try:
self.loop.add_signal_handler(getattr(signal, signame), self.stop)
except NotImplementedError:
# SIGINT and SIGTERM are not implemented on windows
pass

for node in self.bootstrap_nodes:
# Bootstrap
Expand Down

0 comments on commit 7d8cf7d

Please sign in to comment.