Skip to content

Commit 30df9be

Browse files
authored
Merge pull request #32 from Alexsandruss/dev/json-errors-avoiding
Avoiding JSON errors in system info getting
2 parents 1b8de7a + d62c468 commit 30df9be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def is_ht_enabled():
147147
if gpu_processes != '':
148148
print(f'There are running processes on GPU:\n{gpu_processes}',
149149
file=sys.stderr)
150-
except FileNotFoundError:
150+
except (FileNotFoundError, json.JSONDecodeError):
151151
pass
152152

153153
# get python packages info from conda
@@ -161,7 +161,7 @@ def is_ht_enabled():
161161
if col in pkg.keys():
162162
pkg_info.update({col: pkg[col]})
163163
json_result['software'].update({pkg['name']: pkg_info})
164-
except FileNotFoundError:
164+
except (FileNotFoundError, json.JSONDecodeError):
165165
pass
166166

167167
batch = time.strftime('%Y-%m-%dT%H:%M:%S%z')

0 commit comments

Comments
 (0)