[CalendarServer-changes] [14595] CalendarServer/trunk/setup.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 13 15:45:44 PDT 2015


Revision: 14595
          http://trac.calendarserver.org//changeset/14595
Author:   sagen at apple.com
Date:     2015-03-13 15:45:44 -0700 (Fri, 13 Mar 2015)
Log Message:
-----------
Fix more lstrip issues

Modified Paths:
--------------
    CalendarServer/trunk/setup.py

Modified: CalendarServer/trunk/setup.py
===================================================================
--- CalendarServer/trunk/setup.py	2015-03-13 22:44:42 UTC (rev 14594)
+++ CalendarServer/trunk/setup.py	2015-03-13 22:45:44 UTC (rev 14595)
@@ -121,7 +121,8 @@
                 continue
         path = entry.attrib["path"]
         if wc_path != ".":
-            path = path.lstrip(wc_path)
+            if path.startswith(wc_path):
+                path = path[len(wc_path):]
         yield dict(path=path)
 
 
@@ -153,7 +154,7 @@
 
 
     if info["branch"].startswith("tags/release/"):
-        project_version = info["branch"].lstrip("tags/release/")
+        project_version = info["branch"][len("tags/release/"):]
         project, version = project_version.split("-")
         assert project == project_name, (
             "Tagged project {!r} != {!r}".format(project, project_name)
@@ -165,7 +166,7 @@
         return "{}{}".format(base_version, modified)
 
     if info["branch"].startswith("branches/release/"):
-        project_version = info["branch"].lstrip("branches/release/")
+        project_version = info["branch"][len("branches/release/"):]
         project, version, dev = project_version.split("-")
         assert project == project_name, (
             "Branched project {!r} != {!r}".format(project, project_name)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150313/9a60ca13/attachment.html>


More information about the calendarserver-changes mailing list