Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backup.py
diff options
context:
space:
mode:
Diffstat (limited to 'backup.py')
-rw-r--r--backup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/backup.py b/backup.py
index 077854d..1ddac29 100644
--- a/backup.py
+++ b/backup.py
@@ -771,7 +771,12 @@ class BackupActivity(activity.Activity):
"""Make storage medium selectable in the UI."""
# FIXME: update space information periodically or at least after
# backup run
- stat = os.statvfs(path)
+ try:
+ stat = os.statvfs(path)
+ except EnvironmentError:
+ logging.exception('Could not statvfs() mount point %r', path)
+ return
+
free_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL]
# total_space = stat[statvfs.F_BSIZE] * stat[statvfs.F_BLOCKS]
self._media_combo_model.append([icon_name, medium_name, path,