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

Proposed by Antonio Terceiro
Status: Merged
Approved by: Stevan Radaković
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ć Approve
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.
Revision history for this message
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
=== modified file 'dashboard_app/models.py'
--- dashboard_app/models.py 2013-04-01 08:50:05 +0000
+++ dashboard_app/models.py 2013-08-30 19:46:19 +0000
@@ -275,6 +275,8 @@
275 Returns user, group, slug, is_public, is_anonymous275 Returns user, group, slug, is_public, is_anonymous
276 Raises ValueError if the pathname is not well formed276 Raises ValueError if the pathname is not well formed
277 """277 """
278 if not pathname.endswith('/'):
279 pathname = pathname + '/'
278 pathname_parts = pathname.split('/')280 pathname_parts = pathname.split('/')
279 if len(pathname_parts) < 3:281 if len(pathname_parts) < 3:
280 raise ValueError("Pathname too short: %r" % pathname)282 raise ValueError("Pathname too short: %r" % pathname)

Subscribers

People subscribed via source and target branches