Merge lp:~terceiro/lava-dashboard/down-with-the-trailing-slash into lp:lava-dashboard

Proposed by Antonio Terceiro on 2013-08-30
Status: Merged
Approved by: Stevan Radaković on 2013-09-02
Approved revision: 416
Merged at revision: 417
Proposed branch: lp:~terceiro/lava-dashboard/down-with-the-trailing-slash
Merge into: lp:lava-dashboard
Diff against target: 12 lines (+2/-0)
1 file modified
dashboard_app/models.py (+2/-0)
To merge this branch: bzr merge lp:~terceiro/lava-dashboard/down-with-the-trailing-slash
Reviewer Review Type Date Requested Status
Stevan Radaković 2013-08-30 Approve on 2013-09-02
Review via email: mp+183260@code.launchpad.net

Description of the change

Drops the requirements of having a trailing slash in bundle stream name (by adding one under the hood when needed)

To post a comment you must log in.
Stevan Radaković (stevanr) wrote :

Works like a charm, thanks.
Approve +1.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dashboard_app/models.py'
2--- dashboard_app/models.py 2013-04-01 08:50:05 +0000
3+++ dashboard_app/models.py 2013-08-30 19:46:19 +0000
4@@ -275,6 +275,8 @@
5 Returns user, group, slug, is_public, is_anonymous
6 Raises ValueError if the pathname is not well formed
7 """
8+ if not pathname.endswith('/'):
9+ pathname = pathname + '/'
10 pathname_parts = pathname.split('/')
11 if len(pathname_parts) < 3:
12 raise ValueError("Pathname too short: %r" % pathname)

Subscribers

People subscribed via source and target branches