conduit r1832 - in trunk: . conduit/platform
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1832 - in trunk: . conduit/platform
- Date: Fri, 23 Jan 2009 03:44:29 +0000 (UTC)
Author: jstowers
Date: Fri Jan 23 03:44:29 2009
New Revision: 1832
URL: http://svn.gnome.org/viewvc/conduit?rev=1832&view=rev
Log:
2009-01-23 John Stowers <john stowers gmail com>
* conduit/platform/FileGnomeVfs.py:
Dont crash so hard if stupid GnomeVfs sucks and cant
get the volume. Remember, do not use GnomeVfs, conduit
supports GIO and it is 7x better.
Fixes #551588
Modified:
trunk/ChangeLog
trunk/conduit/platform/FileGnomeVfs.py
Modified: trunk/conduit/platform/FileGnomeVfs.py
==============================================================================
--- trunk/conduit/platform/FileGnomeVfs.py (original)
+++ trunk/conduit/platform/FileGnomeVfs.py Fri Jan 23 03:44:29 2009
@@ -182,19 +182,31 @@
def is_on_removale_volume(self):
path = self.get_local_path()
if path:
- return gnomevfs.VolumeMonitor().get_volume_for_path(path).is_user_visible()
+ vol = gnomevfs.VolumeMonitor().get_volume_for_path(path)
+ if vol:
+ return vol.is_user_visible()
+ else:
+ log.warn("Could not get volume for path: %s" % path)
return False
def get_removable_volume_root_uri(self):
path = self.get_local_path()
if path:
- return gnomevfs.VolumeMonitor().get_volume_for_path(path).get_activation_uri()
+ vol = gnomevfs.VolumeMonitor().get_volume_for_path(path)
+ if vol:
+ return vol.get_activation_uri()
+ else:
+ log.warn("Could not get volume for path: %s" % path)
return False
def get_filesystem_type(self):
path = self.get_local_path()
if path:
- return gnomevfs.VolumeMonitor().get_volume_for_path(path).get_filesystem_type()
+ vol = gnomevfs.VolumeMonitor().get_volume_for_path(path)
+ if vol:
+ return vol.get_filesystem_type()
+ else:
+ log.warn("Could not get volume for path: %s" % path)
return None
@staticmethod
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]