summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-04-29 21:25:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-04-29 21:25:08 +0200
commitfee906b57ced28e201f063b6cc992d3cebb78626 (patch)
tree938f9fd7c0f72c412e65c46ac839a3dcb15c2db6
parentfixed updater, moved config files, folder for each package now optional (diff)
downloadpyload-fee906b57ced28e201f063b6cc992d3cebb78626.tar.xz
statvfs fix
-rwxr-xr-xpyLoadCore.py2
1 files changed, 1 insertions, 1 deletions
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