From fee906b57ced28e201f063b6cc992d3cebb78626 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 29 Apr 2010 21:25:08 +0200 Subject: statvfs fix --- pyLoadCore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyLoadCore.py b/pyLoadCore.py index 0dd8ba28f..05cfc1bfa 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -38,7 +38,6 @@ from os import makedirs from os import name as platform from os import remove from os import sep -from os import statvfs from os.path import abspath from os.path import basename from os.path import dirname @@ -500,6 +499,7 @@ class Core(object): __import__("ctypes").windll.kernel32.GetDiskFreeSpaceExW(ctypes.c_wchar_p(folder), None, None, ctypes.pointer(free_bytes)) return free_bytes.value / 1024 / 1024 #megabyte else: + from os import statvfs s = statvfs(folder) return s.f_bsize * s.f_bavail / 1024 / 1024 #megabyte -- cgit v1.2.3