Skip to content
Snippets Groups Projects
Commit ac837486 authored by Anael Beutot's avatar Anael Beutot
Browse files

Added util function for getting signal names from signal numbers

parent ebdbde46
No related branches found
No related tags found
No related merge requests found
......@@ -156,3 +156,11 @@ def set_signal_map(map_):
sig_names = dict((k, v) for v, k in signal.__dict__.iteritems() if
v.startswith('SIG'))
def num_to_sig(num):
"""Returns signal name.
:param num: signal number
"""
return sig_names.get(num, 'Unknown signal')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment