From 1171bc8ca63b2acbba2caf1571f44fe437cad885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Sun, 1 Feb 2015 13:18:55 +0100 Subject: [PATCH] Quotas sur tous les filesystems --- utils/quota.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/utils/quota.py b/utils/quota.py index 87865b25..acf58048 100644 --- a/utils/quota.py +++ b/utils/quota.py @@ -17,7 +17,7 @@ def getUserQuota( userLogin ): pipe.close() string_result = string_result.split("\n") quotas = [] - for a_line in string_result[2:3]: + for a_line in string_result[2:-1]: usage, quota, limite, percentage, fs = a_line.split("\t") line_dict = { "label": "Quota personnel", @@ -25,7 +25,7 @@ def getUserQuota( userLogin ): "quota":getFloat(quota), "limite":getFloat(limite), "%":getFloat(percentage), - "filesystem":"rda", # pourquoi pas ? + "filesystem":fs, # pourquoi pas ? } quotas.append(line_dict) return quotas @@ -34,17 +34,17 @@ def getUserQuota( userLogin ): def fake_getUserQuota( userLogin ): return [ - {'%': 33.9, - 'quota': 390.62, + {'%': 33.9, + 'quota': 390.62, 'label': u'Dossier personnel (fake)', 'limite': 585.94, - 'filesystem': '/home', - 'usage': 420.32}, - {'%': 0.1, - 'quota': 100.00, + 'filesystem': '/home', + 'usage': 420.32}, + {'%': 0.1, + 'quota': 100.00, 'label': u'Boite de r\xe9ception (fake)', - 'limite': 150.00, - 'filesystem': '/var/mail', + 'limite': 150.00, + 'filesystem': '/var/mail', 'usage': 0.06} - ] - + ] +