Update fn.py
Browse files
fn.py
CHANGED
|
@@ -34,6 +34,8 @@ def run():
|
|
| 34 |
csv = subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout
|
| 35 |
lines = csv.split("\n")
|
| 36 |
for line in lines:
|
|
|
|
|
|
|
| 37 |
r = line.split(',')
|
| 38 |
gpu += round(float(r[0]))
|
| 39 |
vrama += round(float(r[1]))
|
|
@@ -57,4 +59,5 @@ def run():
|
|
| 57 |
|
| 58 |
return res
|
| 59 |
except Exception as e:
|
|
|
|
| 60 |
return {}
|
|
|
|
| 34 |
csv = subprocess.run(cmd, shell=True, capture_output=True, text=True).stdout
|
| 35 |
lines = csv.split("\n")
|
| 36 |
for line in lines:
|
| 37 |
+
if not line:
|
| 38 |
+
continue
|
| 39 |
r = line.split(',')
|
| 40 |
gpu += round(float(r[0]))
|
| 41 |
vrama += round(float(r[1]))
|
|
|
|
| 59 |
|
| 60 |
return res
|
| 61 |
except Exception as e:
|
| 62 |
+
print(e)
|
| 63 |
return {}
|