{"action":"created","issue":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/8145","repository_url":"https://api.github.com/repos/dmwm/WMCore","labels_url":"https://api.github.com/repos/dmwm/WMCore/issues/8145/labels{/name}","comments_url":"https://api.github.com/repos/dmwm/WMCore/issues/8145/comments","events_url":"https://api.github.com/repos/dmwm/WMCore/issues/8145/events","html_url":"https://github.com/dmwm/WMCore/pull/8145","id":255971048,"number":8145,"title":"Fix for #8141, add quote function definition to jinja templates","user":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars0.githubusercontent.com/u/125138?v=4","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"labels":[{"id":311378297,"url":"https://api.github.com/repos/dmwm/WMCore/labels/Do%20not%20merge%20yet","name":"Do not merge yet","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-09-07T15:08:36Z","updated_at":"2017-09-08T11:35:28Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dmwm/WMCore/pulls/8145","html_url":"https://github.com/dmwm/WMCore/pull/8145","diff_url":"https://github.com/dmwm/WMCore/pull/8145.diff","patch_url":"https://github.com/dmwm/WMCore/pull/8145.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/dmwm/WMCore/issues/comments/328080290","html_url":"https://github.com/dmwm/WMCore/pull/8145#issuecomment-328080290","issue_url":"https://api.github.com/repos/dmwm/WMCore/issues/8145","id":328080290,"user":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars0.githubusercontent.com/u/125138?v=4","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"created_at":"2017-09-08T11:35:28Z","updated_at":"2017-09-08T11:35:28Z","author_association":"CONTRIBUTOR","body":"Alan, you're correct and changes were applied to fix what you suggested.\n\nOn  0, Alan Malta Rodrigues <notifications@github.com> wrote:\n> amaltaro requested changes on this pull request.\n> \n> \n> \n> > @@ -34,6 +31,31 @@\n>  except:\n>      pass\n>  \n> +\n> +def quote(data):\n> +    \"\"\"\n> +    Sanitize the data using cgi.escape.\n> +    \"\"\"\n> +    if  isinstance(data, (int, float)):\n> +        res = data\n> +    elif  isinstance(data, dict):\n> +        res = data\n> +    elif  isinstance(data, list):\n> +        res = data\n> +    elif  isinstance(data, (int, long, float)):\n> \n> Given all these if's have do the same thing, why don't we do a single `if ... else ...`? BTW, besides long, the last one is dup. \n> Also, remove all these double space please. We follow the pep-8 convention and this will just create pylint complaints whenever someone change this file.\n> \n> -- \n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub:\n> https://github.com/dmwm/WMCore/pull/8145#pullrequestreview-61426044\n"}}
{"actor":{"display_login":"vkuznet"}}