diff mbox

[Branch,~linaro-validation/lava-dashboard/trunk] Rev 417: Remove requirement for trailing slash when giving bundle stream names

Message ID 20130902203922.7795.54048.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Antonio Terceiro Sept. 2, 2013, 8:39 p.m. UTC
Merge authors:
  Antonio Terceiro (terceiro)
Related merge proposals:
  https://code.launchpad.net/~terceiro/lava-dashboard/down-with-the-trailing-slash/+merge/183260
  proposed by: Antonio Terceiro (terceiro)
  review: Approve - Stevan Radaković (stevanr)
------------------------------------------------------------
revno: 417 [merge]
committer: Antonio Terceiro <antonio.terceiro@linaro.org>
branch nick: trunk
timestamp: Mon 2013-09-02 17:36:10 -0300
message:
  Remove requirement for trailing slash when giving bundle stream names
modified:
  dashboard_app/models.py


--
lp:lava-dashboard
https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk

You are subscribed to branch lp:lava-dashboard.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'dashboard_app/models.py'
--- dashboard_app/models.py	2013-09-02 13:48:15 +0000
+++ dashboard_app/models.py	2013-09-02 20:36:10 +0000
@@ -275,6 +275,8 @@ 
         Returns user, group, slug, is_public, is_anonymous
         Raises ValueError if the pathname is not well formed
         """
+        if not pathname.endswith('/'):
+            pathname = pathname + '/'
         pathname_parts = pathname.split('/')
         if len(pathname_parts) < 3:
             raise ValueError("Pathname too short: %r" % pathname)