When working with the baseurl code in pootle.py, I noticed the  
following command was used to strip the baseurl (on line 231):
baseurl = re.sub('http://[^/]', '', self.instance.baseurl)

It seems like this command should be
baseurl = re.sub('http://[^/]*', '', self.instance.baseurl)
as the current regex will only match one character after "http://"; in  
the baseurl.

A proposed patch for this follows:

Index: pootle.py
===================================================================
--- pootle.py (revision 7983)
+++ pootle.py (working copy)
@@ -228,7 +228,7 @@
      argdict = newargdict

      # Strip of the base url
-    baseurl = re.sub('http://[^/]', '', self.instance.baseurl)
+    baseurl = re.sub('http://[^/]*', '', self.instance.baseurl)
      # Split up and remove empty parts
      basepathwords = filter(None, baseurl.split('/'))
      while pathwords and basepathwords and basepathwords[0] ==  
pathwords[0]:

Thanks,
Dan Schafer
Intern - Mozilla Corporation
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to