On 15 May 2013 12:22, Helga Velroyen <[email protected]> wrote: > Small interdiff due to lin errors: > > diff --git a/lib/storage/filestorage.py b/lib/storage/filestorage.py > index 4f001b1..3e64018 100644 > --- a/lib/storage/filestorage.py > +++ b/lib/storage/filestorage.py > @@ -26,7 +26,6 @@ > import os > > from ganeti import errors > -from ganeti import utils > > > def GetSpaceInfo(path): > @@ -37,6 +36,7 @@ def GetSpaceInfo(path): > @param path: Path of the file whose embracing device's capacity is > reported. > @return: a dictionary containing 'vg_size' and 'vg_free' given in > MebiBytes > + > """ > try: > result = os.statvfs(path) > @@ -44,5 +44,5 @@ def GetSpaceInfo(path): > size = (result.f_frsize * result.f_blocks) / (1024 * 1024) > return {"vg_size": size, "vg_free": free} > except OSError, e: > - raise errors.CommandError("Failed retrieve file system information > about" > + raise errors.CommandError("Failed to retrieve file system information > about" > " path: %s - %s" % (path, e.strerror)) > > > > On Wed, May 15, 2013 at 12:13 PM, Helga Velroyen <[email protected]> wrote: >> >> This simplifies my previous commit (820bade90) by using os.statvfs >> instead of parsing the output of 'df'. >> >> Signed-off-by: Helga Velroyen <[email protected]> >> --- >> lib/storage/filestorage.py | 54 >> ++++++-------------------- >> test/py/ganeti.storage.filestorage_unittest.py | 44 --------------------- >> 2 files changed, 12 insertions(+), 86 deletions(-)
LGTM, thanks. Bernardo
