Merge lp:~mbp/zeitgeist-datasources/vim into lp:zeitgeist-datasources/0.8

Proposed by Martin Pool
Status: Merged
Merged at revision: 142
Proposed branch: lp:~mbp/zeitgeist-datasources/vim
Merge into: lp:zeitgeist-datasources/0.8
Diff against target: 19 lines (+3/-3)
1 file modified
vim/zeitgeist.vim (+3/-3)
To merge this branch: bzr merge lp:~mbp/zeitgeist-datasources/vim
Reviewer Review Type Date Requested Status
Siegfried Gevatter Approve
Review via email: mp+61604@code.launchpad.net

Description of the change

just a small incremental update: we need to guard against and absorb gio errors that might occur even after opening the file

To post a comment you must log in.
Revision history for this message
Siegfried Gevatter (rainct) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'vim/zeitgeist.vim'
2--- vim/zeitgeist.vim 2011-05-12 13:25:19 +0000
3+++ vim/zeitgeist.vim 2011-05-19 16:07:48 +0000
4@@ -19,12 +19,12 @@
5
6 try:
7 f = gio.File(filename)
8+ fi = f.query_info(gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE)
9+ uri = f.get_uri()
10+ mimetype = fi.get_content_type()
11 except gio.Error:
12 pass
13 else:
14- fi = f.query_info(gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE)
15- uri = f.get_uri()
16- mimetype = fi.get_content_type()
17 subject = Subject.new_for_values(
18 uri=unicode(uri),
19 text=unicode(uri.rpartition("/")[2]),

Subscribers

People subscribed via source and target branches