Merge lp:~timkuhlman/codetree/source-parsing-error into lp:codetree

Proposed by Tim Kuhlman
Status: Merged
Merged at revision: 75
Proposed branch: lp:~timkuhlman/codetree/source-parsing-error
Merge into: lp:codetree
Diff against target: 14 lines (+4/-1)
1 file modified
codetree/config.py (+4/-1)
To merge this branch: bzr merge lp:~timkuhlman/codetree/source-parsing-error
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Stuart Bishop (community) Approve
Tim Kuhlman Pending
Review via email: mp+311998@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

Looks good.

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

Looks good, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'codetree/config.py'
2--- codetree/config.py 2016-05-11 15:13:22 +0000
3+++ codetree/config.py 2016-11-29 00:19:42 +0000
4@@ -21,7 +21,10 @@
5 msg = "A local destination must be supplied: "
6 msg += "{} (line {})".format(D.location, inpfile, lineno)
7 raise InvalidDirective(msg)
8- url, D.source_options = cls.parse_source(source)
9+ try:
10+ url, D.source_options = cls.parse_source(source)
11+ except Exception as e:
12+ raise InvalidDirective('Unable to parse source "{}": {}'.format(source, e))
13 D.source = handler_for_url(url)
14 return D
15

Subscribers

People subscribed via source and target branches