From 2ae01fbd68afbc84258a5aa00c8f0c8e7a2c1091 Mon Sep 17 00:00:00 2001 From: Maurice Leeflang Date: Tue, 1 Jul 2014 19:19:27 +0200 Subject: [PATCH] Added an extra parameter to the df command The parameter is needed to avoid multi-line output, which results in an IndexError, because only one line is being searched for values. Change-Id: Ie518c6a3573b7868065501a02cd0bd8565656a71 Closes-Bug: 1336238 --- glance/store/filesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glance/store/filesystem.py b/glance/store/filesystem.py index 5ad67f192e..15c5390fc7 100644 --- a/glance/store/filesystem.py +++ b/glance/store/filesystem.py @@ -356,7 +356,7 @@ class Store(glance.store.base.Store): """ #Calculate total available space - df = processutils.execute("df", "-k", + df = processutils.execute("df", "-k", "-P", mount_point)[0].strip("'\n'") total_available_space = int(df.split('\n')[1].split()[3]) * units.Ki