Skip to content
Myr

Merge pull request #515 from msabramo/travis

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Travis

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 086348e, 2c8cbeb · Browse files · 2 files+18 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+18 added−3 removed

  • other:+18 added−3 removed

2 files+18 added−3 removed

modified:flask/helpers.py+7 added-3 removed
131 unmodified lines
132 callback-function name.133 """134 if __debug__:135 _assert_have_json()136137 padded = kwargs.get('padded', False)138 if 'padded' in kwargs:139 del kwargs['padded']140141 if padded:137 if isinstance(kwargs['padded'], str):138 callback = request.args.get(kwargs['padded']) or 'jsonp'142 if isinstance(padded, str):143 callback = request.args.get(padded) or 'jsonp'144 else:145 callback = request.args.get('callback') or \146 request.args.get('jsonp') or 'jsonp'142 del kwargs['padded']147 json_str = json.dumps(dict(*args, **kwargs), indent=None)148 content = str(callback) + "(" + json_str + ")"149 return current_app.response_class(content, mimetype='application/javascript')150 return current_app.response_class(json.dumps(dict(*args, **kwargs),
684 unmodified lines
added:.travis.yml+11 added