https://bugs.gpodder.org/show_bug.cgi?id=1150

--- Comment #5 from Thomas Perl <[email protected]> 2010-11-22 19:20:54 GMT ---
(In reply to comment #2)
> Created an attachment (id=588)
 --> (https://bugs.gpodder.org/attachment.cgi?id=588) [details]
> try adding support for gvfs-fuse mount point (not iphone/ipod specific)
> 
> try adding support for gvfs-fuse mount point, which is the way few OS,
> automatically mount your external devices in userland.

Please rework this patch:

 * Instead of "no_gio_available = 0" use "have_gio = True"
 * Instead of "no_gio_available = 1" use "have_gio = False"
 * The "pass" is unnecessary in the "except ImportError" block

 * Instead of "path.find('.gvfs')" use "'.gvfs' in path.split(os.sep)"

This avoids having false positives as this example demonstrates:

>>> import os
>>> path = "/media/test/direct.gvfsomething/blubb"
>>> path.find('.gvfs')
18
>>> '.gvfs' in path.split(os.sep)
False
>>> path = "/media/.gvfs/hossa"
>>> path.find('.gvfs')
7
>>> '.gvfs' in path.split(os.sep)
True

 * Make sure you don't use tabs, but 4 spaces for indentation

Otherwise the patch looks good and ready for inclusion. Your patch should
probably also add a mention the optional dependency on "gio" in the README
file.

-- 
Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to