Author: duncan
Date: Sat Mar 24 14:19:43 2007
New Revision: 9385
Modified:
branches/rel-1/freevo/src/util/fileops.py
Log:
For some reason the freespace was not in a try except block and may not work
for cds
Now added try except block
Modified: branches/rel-1/freevo/src/util/fileops.py
==============================================================================
--- branches/rel-1/freevo/src/util/fileops.py (original)
+++ branches/rel-1/freevo/src/util/fileops.py Sat Mar 24 14:19:43 2007
@@ -115,8 +115,12 @@
Return the number of bytes available to the user on the file system
pointed to by path.
"""
- s = os.statvfs(path)
- return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])
+ try:
+ s = os.statvfs(path)
+ return s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])
+ except OSError, e:
+ print '\"%s\": %s' % (path, e)
+ return 0
def totalspace(path):
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog