Twenga / twgit

Twgit is a free and open source assisting tools for managing features, hotfixes and releases on Git repositories. It provides simple, high-level commands to adopt the branching model describes in our documentation. Supported OS: Debian/Ubuntu Linux, Mac OS X 10.8 (Mountain Lion) or lower.
http://twgit.twenga.com/
Other
111 stars 34 forks source link

Feature/hotfix/jira #134

Closed oversanne closed 10 years ago

oversanne commented 10 years ago

There is an issue using python. Sometimes in jira it doesn't interprete correctly return of jira api. But in PHP it works.

I propose this quick ugly hotfix, and I propose to use curl instead of wget.

geoffroy-aubry commented 10 years ago

Sorry, it's too ugly ;-) Currently only wget availability is tested in assert_connectors_well_configured() function in inc/common.inc.sh. Add curl will be excessive… You must find a value misinterpreted by Jira connector to reproduce the bug :-/

oversanne commented 10 years ago

echo $data | python -c "import json,sys;s=sys.stdin.read();s=s.replace('\r\n', '');s=json.loads(s);print s['fields']['summary'];" 2>~/www/twgit/.history.error

gives:

Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 45: ordinal not in range(128) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 62, in import os File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 398, in import UserDict File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 1, in """A more or less complete user-defined wrapper around dictionary objects.""" KeyboardInterrupt

oversanne commented 10 years ago

I change encoding. PR update. Could you check?

oversanne commented 10 years ago

This solved my problem, and now it works fine :)

geoffroy-aubry commented 10 years ago

It's not the solution to convert into ASCII… Some characters will be unreadable.

I read the code of Jira connector and I realize his author went a bit too fast :-/

I open a hotfix and ask you for validation. Thanks for your perseverance ^^

oversanne commented 10 years ago

Ok thanks :)

ghost commented 10 years ago

Still boggy on my side. Any progress ?