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
This commit is contained in:
Maurice Leeflang
2014-07-01 19:19:27 +02:00
parent 8c1a2d9fbb
commit 2ae01fbd68

View File

@@ -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