diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-28 11:16:59 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-04-28 11:16:59 +0200 |
commit | 5444e453ee6a0afeb6007c49b140e1252973c1d5 (patch) | |
tree | 4704788ffa2717b5cb97e4012ecf3537de5b707a /src | |
parent | 1a83ebba238bb4c16a178e48c6f15e038b1f6209 (diff) |
Fix disk used size calculation
This patch calculates correctly the percentage of disk used. This could cause
an overflow on the ogAdmSever DB.
Diffstat (limited to 'src')
-rw-r--r-- | src/virtual/ogOperations.py | 2 |
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, |