Skip to content

Commit 31363e9

Browse files
authored
Merge pull request #4 from FusionSolutions/patch
Update to v0.0.5
2 parents bdb47ed + 902cf3d commit 31363e9

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

fsSignal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.0.4"
1+
__version__ = "0.0.5"
22
__doc__ = """
33
Signal capturer v{}
44
Copyright (C) 2021 Fusion Solutions KFT <contact@fusionsolutions.io>

fsSignal/fsSignal.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from threading import Event
55
from time import monotonic, sleep
66
from typing import Callable, Dict, Any, Iterator, Iterable, Optional, Union
7-
from types import FrameType
87
# Third party modules
98
# Local modules
109
# Program
@@ -110,15 +109,14 @@ class HardSignal(BaseSignal):
110109

111110
class Signal(HardSignal):
112111
_handler:Optional[Signal] = None
113-
softKillFn:Optional[Callable[[Signals, FrameType], Any]]
114-
hardKillFn:Optional[Callable[[Signals, FrameType], Any]]
112+
softKillFn:Optional[Callable[..., Any]]
113+
hardKillFn:Optional[Callable[..., Any]]
115114
forceKillCounterFn:Optional[Callable[[int, int], Any]]
116115
counter:int
117116
forceCounter:int
118117
eSoft:Event
119118
eHard:Event
120-
def __init__(self, softKillFn:Optional[Callable[[Signals, FrameType], Any]]=None,
121-
hardKillFn:Optional[Callable[[Signals, FrameType], Any]]=None,
119+
def __init__(self, softKillFn:Optional[Callable[..., Any]]=None, hardKillFn:Optional[Callable[..., Any]]=None,
122120
forceKillCounterFn:Optional[Callable[[int, int], Any]]=None, forceCounter:int=10):
123121
self.softKillFn = softKillFn
124122
self.hardKillFn = hardKillFn
@@ -182,15 +180,15 @@ def _softKill(self) -> None:
182180
self.eSoft.set()
183181
if callable(self.softKillFn):
184182
try:
185-
self.softKillFn() # type: ignore
183+
self.softKillFn()
186184
except:
187185
traceback.print_exc()
188186
def _hardKill(self) -> None:
189187
if not self.eHard.is_set():
190188
self.eHard.set()
191189
if callable(self.hardKillFn):
192190
try:
193-
self.hardKillFn() # type: ignore
191+
self.hardKillFn()
194192
except:
195193
traceback.print_exc()
196194
def _reset(self) -> None:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
import os, shutil
2+
import os
33
import fsSignal
44
try:
55
from setuptools import setup
@@ -13,7 +13,7 @@
1313
version = fsSignal.__version__,
1414
description = "Signal capturer",
1515
keywords = "signal capture utility fusion solutions fusionsolutions",
16-
author = "Andor `iFA88` Rajci - Fusions Solutions KFT",
16+
author = "Andor `iFA` Rajci - Fusions Solutions KFT",
1717
author_email = "ifa@fusionsolutions.io",
1818
url = "https://github.com/FusionSolutions/python-fssignal",
1919
license = "GPL-3",

0 commit comments

Comments
 (0)