Merge lp:~nuclearbob/utah/bug1195469 into lp:utah

Proposed by Max Brustkern
Status: Merged
Merged at revision: 958
Proposed branch: lp:~nuclearbob/utah/bug1195469
Merge into: lp:utah
Diff against target: 25 lines (+3/-1)
2 files modified
utah/config.py (+1/-1)
utah/url.py (+2/-0)
To merge this branch: bzr merge lp:~nuclearbob/utah/bug1195469
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+171941@code.launchpad.net

Description of the change

In the bug, we were treating an empty string as a url, which ended up giving us the cwd as the return from url_argument. I've changed url_argument to return None if an empty string is passed.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/config.py'
2--- utah/config.py 2013-06-14 03:41:10 +0000
3+++ utah/config.py 2013-06-28 00:45:35 +0000
4@@ -647,7 +647,7 @@
5 for key, value in data.iteritems():
6 if key in self._set_by:
7 sys.stderr.write(
8- 'WARNING: {} was already set by {}'
9+ 'WARNING: {} was already set by {}\n'
10 .format(key, self._set_by[key]))
11 setattr(self, key, value)
12 self._set_by[key] = conffile
13
14=== modified file 'utah/url.py'
15--- utah/url.py 2013-04-16 10:02:18 +0000
16+++ utah/url.py 2013-06-28 00:45:35 +0000
17@@ -202,6 +202,8 @@
18 .. seealso:: :class:`URLChecker`
19
20 """
21+ if url == '':
22+ return None
23 parse_result = urlparse(url)
24 if parse_result.scheme in ('', 'file', 'http', 'https'):
25 url_checker = URLChecker()

Subscribers

People subscribed via source and target branches