andreif / uwsgi-tools

curl and proxy for remote uwsgi app server
BSD 3-Clause "New" or "Revised" License
43 stars 11 forks source link

uwsgi_curl exit with wrong exit code since 1.1.0 #4

Closed atiking closed 6 years ago

atiking commented 6 years ago

I got wrong exit code(1) when I got http status 200 from uwsgi_curl command.

I think the reason is ab469b45eae773e8b16491a5155470a02af0fb7e. The cli function will return true when get status 200. So in the generated uwsgi_curl

import re
import sys

from uwsgi_tools.curl import cli

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(cli())

It will exit with 1

andreif commented 6 years ago

@atiking Ah thanks, my bad! Fixed in 1.1.1.