summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-04-28 11:16:59 +0200
committerRoberto Hueso Gómez <rhueso@soleta.eu>2020-04-28 11:16:59 +0200
commit5444e453ee6a0afeb6007c49b140e1252973c1d5 (patch)
tree4704788ffa2717b5cb97e4012ecf3537de5b707a
parent1a83ebba238bb4c16a178e48c6f15e038b1f6209 (diff)
Fix disk used size calculation
This patch calculates correctly the percentage of disk used. This could cause an overflow on the ogAdmSever DB.
-rw-r--r--src/virtual/ogOperations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py
index e6aa506..ff9c937 100644
--- a/src/virtual/ogOperations.py
+++ b/src/virtual/ogOperations.py
@@ -170,7 +170,7 @@ class OgVirtualOperations:
'filesystem': '',
'os': '',
'size': int(free_disk / 1024),
- 'used_size': int(100 * used_disk / free_disk)},
+ 'used_size': int(100 * used_disk / total_disk)},
'partition_setup': []}
for i in range(4):
part_json = {'disk': 1,