Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added fallback when the destination folder doesn't exists

  • Loading branch information...
commit 7b18fb41244ec3fb2963ef77d59207373393c320 1 parent 3afe3ea
Sergio Costas authored
Showing with 9 additions and 6 deletions.
  1. +8 −5 devede_convert.py
  2. +1 −1  version.txt
View
13 devede_convert.py
@@ -116,17 +116,20 @@ def check_free_space(self,filefolder,structure,actions,erase_temporary_files,sou
estado=''
freespace=''
if (sys.platform!="win32") and (sys.platform!="win64"):
- print "Checking "+str(filefolder)
- estado=os.statvfs(filefolder) # eg. f="C:\Documents and Settings\User name\Desktop"
- freespace=95*estado.f_bsize*estado.f_bavail/100000
+ try:
+ print "Checking "+str(filefolder)
+ estado=os.statvfs(filefolder) # eg. f="C:\Documents and Settings\User name\Desktop"
+ freespace=95*estado.f_bsize*estado.f_bavail/100000
+ except ImportError:
+ print "Error when checking free space"
+ freespace=0
else:
try:
test_drive = os.path.splitdrive(filefolder)[0] + "\\" # So it will also work on Windows 2000
spc, bps, fc, tc = win32api.GetDiskFreeSpace(test_drive)
freespace=fc * spc * bps
-
except ImportError:
- pass
+ freespace=0
print "Free space in "+str(filefolder)+": "+str(freespace)
print "estatus ", estado, "\n"
View
2  version.txt
@@ -1 +1 @@
-Devede 3.22.0
+Devede 3.23.0 beta 1
Please sign in to comment.
Something went wrong with that request. Please try again.