Re: Change Request: Test unicode fixes on transifex on app4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-04-30 at 13:07 -0400, Ricky Zhou wrote:
> Recently, translators with unicode characters in their name have been
> unable to commit to some modules in Transifex.  Since these translations
> need to be submitted for the F9 release and I haven't been able to
> reproduce on a testing instance, I'd like to try a fix on the production
> version on app4.  This should be pretty low risk (and affect nothing but
> transifex for a few minutes).  The change looks something like:
> 
> command = [arg.encode('utf8') for arg in command]
> 
> after line 127 in /srv/tg/transifex/transifex/util.py.  If this doesn't
> work out, I will have to look for other problems (which should once
> again only affect transifex for a bit).  
> 
> Does this sound safe?  

-1

I'm not convinced that this shotgun approach is best. I recommend
applying the less-invasive attached patch and figuring out what's wrong
first.

-- 
Ignacio Vazquez-Abrams <ivazqueznet@xxxxxxxxx>
diff --git a/util.py b/util.py
index 852ff3d..c881fd1 100644
--- a/util.py
+++ b/util.py
@@ -148,8 +148,8 @@ def run_command(command=None, stdin=None):
             #log.debug("Command succeeded")
             pass
         return ret
-    except OSError, e:
-        log.error("Command %s failed: %s", (command, e))
+    except (TypeError, OSError), e:
+        log.error("Command %r failed: %s", (command, e))
         return 1
 
 def fit_text(text, length, ellipsis=u"…"):

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux