diff --git a/jc/parsers/dig.py b/jc/parsers/dig.py index e12975b3..ee28e44b 100644 --- a/jc/parsers/dig.py +++ b/jc/parsers/dig.py @@ -202,7 +202,7 @@ def process(proc_data): try: key_int = int(entry[key]) entry[key] = key_int - except (ValueError, TypeError): + except (ValueError): entry[key] = None if 'answer' in entry: @@ -210,7 +210,7 @@ def process(proc_data): try: ttl_int = int(ans['ttl']) ans['ttl'] = ttl_int - except (ValueError, TypeError): + except (ValueError): ans['ttl'] = None if 'authority' in entry: @@ -218,14 +218,14 @@ def process(proc_data): try: ttl_int = int(auth['ttl']) auth['ttl'] = ttl_int - except (ValueError, TypeError): + except (ValueError): auth['ttl'] = None if 'query_time' in entry: try: qt_int = int(entry['query_time'].split()[0]) entry['query_time'] = qt_int - except (ValueError, TypeError): + except (ValueError): entry['query_time'] = None return proc_data diff --git a/jc/parsers/free.py b/jc/parsers/free.py index 66c469bd..bf3c8505 100644 --- a/jc/parsers/free.py +++ b/jc/parsers/free.py @@ -68,7 +68,7 @@ def process(proc_data): try: key_int = int(entry[key]) entry[key] = key_int - except (ValueError, TypeError): + except (ValueError): entry[key] = None return proc_data diff --git a/jc/parsers/ifconfig.py b/jc/parsers/ifconfig.py index b22c3f30..4e0dc476 100644 --- a/jc/parsers/ifconfig.py +++ b/jc/parsers/ifconfig.py @@ -164,7 +164,7 @@ def process(proc_data): try: key_int = int(entry[key]) entry[key] = key_int - except (ValueError, TypeError): + except (ValueError): entry[key] = None return proc_data diff --git a/jc/parsers/iptables.py b/jc/parsers/iptables.py index 8445f4bc..94c4569d 100644 --- a/jc/parsers/iptables.py +++ b/jc/parsers/iptables.py @@ -159,7 +159,7 @@ def process(proc_data): try: key_int = int(rule[key]) rule[key] = key_int - except (ValueError, TypeError): + except (ValueError): rule[key] = None if 'bytes' in rule: @@ -183,7 +183,7 @@ def process(proc_data): try: bytes_int = int(rule['bytes']) rule['bytes'] = bytes_int * multiplier - except (ValueError, TypeError): + except (ValueError): rule['bytes'] = None if 'opt' in rule: diff --git a/jc/parsers/jobs.py b/jc/parsers/jobs.py index 560e83a4..542c2230 100644 --- a/jc/parsers/jobs.py +++ b/jc/parsers/jobs.py @@ -90,7 +90,7 @@ def process(proc_data): try: key_int = int(entry[key]) entry[key] = key_int - except (ValueError, TypeError): + except (ValueError): entry[key] = None return proc_data diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index 9370cc1e..4d52a617 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -159,7 +159,7 @@ def process(proc_data): try: key_int = int(entry[key]) entry[key] = key_int - except (ValueError, TypeError): + except (ValueError): entry[key] = None return proc_data