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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user