Skip to content

Commit 4afbf58

Browse files
authored
Probably fix the error running on windows
I just copy the code in the folder `saicinpainting` to my code repository, since I just want to adopt `FFC_BN_FLU` layer in my net. Then it occurs an error: ```bash File "C:\Users\xx\tmp\saicinpainting\utils.py", line 104, in <module> def register_debug_signal_handlers(sig=signal.SIGUSR1, handler=print_traceback_handler): AttributeError: module 'signal' has no attribute 'SIGUSR1' ``` This patch fixes the error.
1 parent cf9b1dd commit 4afbf58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

saicinpainting/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
LOGGER = logging.getLogger(__name__)
1515

16+
import platform
17+
if platform.system() != 'Linux':
18+
signal.SIGUSR1 = 1
1619

1720
def check_and_warn_input_range(tensor, min_value, max_value, name):
1821
actual_min = tensor.min()

0 commit comments

Comments
 (0)