{"action":"created","comment":{"url":"https://api.github.com/repos/tinyerp/erppeek/pulls/comments/227004048","pull_request_review_id":166946550,"id":227004048,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzAwNDA0OA==","diff_hunk":"@@ -16,16 +16,18 @@\n import sys\n import time\n import traceback\n-try:                    # Python 3\n+\n+PY2 = (sys.version_info[0] == 2)","path":"erppeek.py","position":6,"original_position":6,"commit_id":"bb4302b7ba71d5dcae428fa82ba815a61cf33297","original_commit_id":"bb4302b7ba71d5dcae428fa82ba815a61cf33297","user":{"login":"eberloso","id":19902135,"node_id":"MDQ6VXNlcjE5OTAyMTM1","avatar_url":"https://avatars3.githubusercontent.com/u/19902135?v=4","gravatar_id":"","url":"https://api.github.com/users/eberloso","html_url":"https://github.com/eberloso","followers_url":"https://api.github.com/users/eberloso/followers","following_url":"https://api.github.com/users/eberloso/following{/other_user}","gists_url":"https://api.github.com/users/eberloso/gists{/gist_id}","starred_url":"https://api.github.com/users/eberloso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eberloso/subscriptions","organizations_url":"https://api.github.com/users/eberloso/orgs","repos_url":"https://api.github.com/users/eberloso/repos","events_url":"https://api.github.com/users/eberloso/events{/privacy}","received_events_url":"https://api.github.com/users/eberloso/received_events","type":"User","site_admin":false},"body":"We could use the `six` library instead of `sys`:\r\n\r\n```python\r\nfrom six import PY2\r\n```\r\n\r\nIt detects which version of python is running.","created_at":"2018-10-22T14:29:18Z","updated_at":"2018-10-22T14:29:18Z","html_url":"https://github.com/tinyerp/erppeek/pull/101#discussion_r227004048","pull_request_url":"https://api.github.com/repos/tinyerp/erppeek/pulls/101","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/comments/227004048"},"html":{"href":"https://github.com/tinyerp/erppeek/pull/101#discussion_r227004048"},"pull_request":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/tinyerp/erppeek/pulls/101","id":174986962,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc0OTg2OTYy","html_url":"https://github.com/tinyerp/erppeek/pull/101","diff_url":"https://github.com/tinyerp/erppeek/pull/101.diff","patch_url":"https://github.com/tinyerp/erppeek/pull/101.patch","issue_url":"https://api.github.com/repos/tinyerp/erppeek/issues/101","number":101,"state":"open","locked":false,"title":"Update erppeek.py","user":{"login":"oducrot","id":15814361,"node_id":"MDQ6VXNlcjE1ODE0MzYx","avatar_url":"https://avatars0.githubusercontent.com/u/15814361?v=4","gravatar_id":"","url":"https://api.github.com/users/oducrot","html_url":"https://github.com/oducrot","followers_url":"https://api.github.com/users/oducrot/followers","following_url":"https://api.github.com/users/oducrot/following{/other_user}","gists_url":"https://api.github.com/users/oducrot/gists{/gist_id}","starred_url":"https://api.github.com/users/oducrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oducrot/subscriptions","organizations_url":"https://api.github.com/users/oducrot/orgs","repos_url":"https://api.github.com/users/oducrot/repos","events_url":"https://api.github.com/users/oducrot/events{/privacy}","received_events_url":"https://api.github.com/users/oducrot/received_events","type":"User","site_admin":false},"body":"# don't use import error to distinguish Python 2 & 3\r\n\r\nconfigparser exists for py2 and py3. If it's installed, there's no import error and PY2 = False\r\n\r\nand the result will be \r\nTraceback (most recent call last):\r\n\r\nFile \"/usr/local/bin/erppeek\", line 11, in <module>\r\n\r\nsys.exit(main())\r\n\r\nFile \"/Library/Python/2.7/site-packages/erppeek.py\", line 1655, in main\r\n\r\nuser=args.user, verbose=args.verbose)\r\n\r\nFile \"/Library/Python/2.7/site-packages/erppeek.py\", line 465, in from_config\r\n\r\nclient = cls(server, verbose=verbose)\r\n\r\nFile \"/Library/Python/2.7/site-packages/erppeek.py\", line 439, in __init__\r\n\r\nself.server_version = ver = get_proxy('db').server_version()\r\n\r\nFile \"/Library/Python/2.7/site-packages/erppeek.py\", line 438, in get_proxy\r\n\r\nreturn Service(server, name, methods, transport, verbose=verbose)\r\n\r\nFile \"/Library/Python/2.7/site-packages/erppeek.py\", line 360, in __init__\r\n\r\nelif server._api_v7:\r\n\r\nAttributeError: 'unicode' object has no attribute '_api_v7'\r\n","created_at":"2018-03-14T15:10:31Z","updated_at":"2018-10-22T14:29:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bfb50c8fde88305fba180bdb40b4359cd725eed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tinyerp/erppeek/pulls/101/commits","review_comments_url":"https://api.github.com/repos/tinyerp/erppeek/pulls/101/comments","review_comment_url":"https://api.github.com/repos/tinyerp/erppeek/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tinyerp/erppeek/issues/101/comments","statuses_url":"https://api.github.com/repos/tinyerp/erppeek/statuses/bb4302b7ba71d5dcae428fa82ba815a61cf33297","head":{"label":"oducrot:patch-1","ref":"patch-1","sha":"bb4302b7ba71d5dcae428fa82ba815a61cf33297","user":{"login":"oducrot","id":15814361,"node_id":"MDQ6VXNlcjE1ODE0MzYx","avatar_url":"https://avatars0.githubusercontent.com/u/15814361?v=4","gravatar_id":"","url":"https://api.github.com/users/oducrot","html_url":"https://github.com/oducrot","followers_url":"https://api.github.com/users/oducrot/followers","following_url":"https://api.github.com/users/oducrot/following{/other_user}","gists_url":"https://api.github.com/users/oducrot/gists{/gist_id}","starred_url":"https://api.github.com/users/oducrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oducrot/subscriptions","organizations_url":"https://api.github.com/users/oducrot/orgs","repos_url":"https://api.github.com/users/oducrot/repos","events_url":"https://api.github.com/users/oducrot/events{/privacy}","received_events_url":"https://api.github.com/users/oducrot/received_events","type":"User","site_admin":false},"repo":{"id":125230303,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUyMzAzMDM=","name":"erppeek","full_name":"oducrot/erppeek","private":false,"owner":{"login":"oducrot","id":15814361,"node_id":"MDQ6VXNlcjE1ODE0MzYx","avatar_url":"https://avatars0.githubusercontent.com/u/15814361?v=4","gravatar_id":"","url":"https://api.github.com/users/oducrot","html_url":"https://github.com/oducrot","followers_url":"https://api.github.com/users/oducrot/followers","following_url":"https://api.github.com/users/oducrot/following{/other_user}","gists_url":"https://api.github.com/users/oducrot/gists{/gist_id}","starred_url":"https://api.github.com/users/oducrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oducrot/subscriptions","organizations_url":"https://api.github.com/users/oducrot/orgs","repos_url":"https://api.github.com/users/oducrot/repos","events_url":"https://api.github.com/users/oducrot/events{/privacy}","received_events_url":"https://api.github.com/users/oducrot/received_events","type":"User","site_admin":false},"html_url":"https://github.com/oducrot/erppeek","description":"ERPpeek, a versatile tool for Odoo / OpenERP","fork":true,"url":"https://api.github.com/repos/oducrot/erppeek","forks_url":"https://api.github.com/repos/oducrot/erppeek/forks","keys_url":"https://api.github.com/repos/oducrot/erppeek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oducrot/erppeek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oducrot/erppeek/teams","hooks_url":"https://api.github.com/repos/oducrot/erppeek/hooks","issue_events_url":"https://api.github.com/repos/oducrot/erppeek/issues/events{/number}","events_url":"https://api.github.com/repos/oducrot/erppeek/events","assignees_url":"https://api.github.com/repos/oducrot/erppeek/assignees{/user}","branches_url":"https://api.github.com/repos/oducrot/erppeek/branches{/branch}","tags_url":"https://api.github.com/repos/oducrot/erppeek/tags","blobs_url":"https://api.github.com/repos/oducrot/erppeek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oducrot/erppeek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oducrot/erppeek/git/refs{/sha}","trees_url":"https://api.github.com/repos/oducrot/erppeek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oducrot/erppeek/statuses/{sha}","languages_url":"https://api.github.com/repos/oducrot/erppeek/languages","stargazers_url":"https://api.github.com/repos/oducrot/erppeek/stargazers","contributors_url":"https://api.github.com/repos/oducrot/erppeek/contributors","subscribers_url":"https://api.github.com/repos/oducrot/erppeek/subscribers","subscription_url":"https://api.github.com/repos/oducrot/erppeek/subscription","commits_url":"https://api.github.com/repos/oducrot/erppeek/commits{/sha}","git_commits_url":"https://api.github.com/repos/oducrot/erppeek/git/commits{/sha}","comments_url":"https://api.github.com/repos/oducrot/erppeek/comments{/number}","issue_comment_url":"https://api.github.com/repos/oducrot/erppeek/issues/comments{/number}","contents_url":"https://api.github.com/repos/oducrot/erppeek/contents/{+path}","compare_url":"https://api.github.com/repos/oducrot/erppeek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oducrot/erppeek/merges","archive_url":"https://api.github.com/repos/oducrot/erppeek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oducrot/erppeek/downloads","issues_url":"https://api.github.com/repos/oducrot/erppeek/issues{/number}","pulls_url":"https://api.github.com/repos/oducrot/erppeek/pulls{/number}","milestones_url":"https://api.github.com/repos/oducrot/erppeek/milestones{/number}","notifications_url":"https://api.github.com/repos/oducrot/erppeek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oducrot/erppeek/labels{/name}","releases_url":"https://api.github.com/repos/oducrot/erppeek/releases{/id}","deployments_url":"https://api.github.com/repos/oducrot/erppeek/deployments","created_at":"2018-03-14T15:01:14Z","updated_at":"2018-03-14T15:01:16Z","pushed_at":"2018-03-14T15:09:42Z","git_url":"git://github.com/oducrot/erppeek.git","ssh_url":"git@github.com:oducrot/erppeek.git","clone_url":"https://github.com/oducrot/erppeek.git","svn_url":"https://github.com/oducrot/erppeek","homepage":"http://pypi.python.org/pypi/ERPpeek","size":404,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tinyerp:master","ref":"master","sha":"e87fddcda02da4bad2d7a80b027356249932b104","user":{"login":"tinyerp","id":7399122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTkxMjI=","avatar_url":"https://avatars0.githubusercontent.com/u/7399122?v=4","gravatar_id":"","url":"https://api.github.com/users/tinyerp","html_url":"https://github.com/tinyerp","followers_url":"https://api.github.com/users/tinyerp/followers","following_url":"https://api.github.com/users/tinyerp/following{/other_user}","gists_url":"https://api.github.com/users/tinyerp/gists{/gist_id}","starred_url":"https://api.github.com/users/tinyerp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinyerp/subscriptions","organizations_url":"https://api.github.com/users/tinyerp/orgs","repos_url":"https://api.github.com/users/tinyerp/repos","events_url":"https://api.github.com/users/tinyerp/events{/privacy}","received_events_url":"https://api.github.com/users/tinyerp/received_events","type":"Organization","site_admin":false},"repo":{"id":3826963,"node_id":"MDEwOlJlcG9zaXRvcnkzODI2OTYz","name":"erppeek","full_name":"tinyerp/erppeek","private":false,"owner":{"login":"tinyerp","id":7399122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTkxMjI=","avatar_url":"https://avatars0.githubusercontent.com/u/7399122?v=4","gravatar_id":"","url":"https://api.github.com/users/tinyerp","html_url":"https://github.com/tinyerp","followers_url":"https://api.github.com/users/tinyerp/followers","following_url":"https://api.github.com/users/tinyerp/following{/other_user}","gists_url":"https://api.github.com/users/tinyerp/gists{/gist_id}","starred_url":"https://api.github.com/users/tinyerp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinyerp/subscriptions","organizations_url":"https://api.github.com/users/tinyerp/orgs","repos_url":"https://api.github.com/users/tinyerp/repos","events_url":"https://api.github.com/users/tinyerp/events{/privacy}","received_events_url":"https://api.github.com/users/tinyerp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tinyerp/erppeek","description":"ERPpeek, a versatile tool for Odoo / OpenERP","fork":false,"url":"https://api.github.com/repos/tinyerp/erppeek","forks_url":"https://api.github.com/repos/tinyerp/erppeek/forks","keys_url":"https://api.github.com/repos/tinyerp/erppeek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tinyerp/erppeek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tinyerp/erppeek/teams","hooks_url":"https://api.github.com/repos/tinyerp/erppeek/hooks","issue_events_url":"https://api.github.com/repos/tinyerp/erppeek/issues/events{/number}","events_url":"https://api.github.com/repos/tinyerp/erppeek/events","assignees_url":"https://api.github.com/repos/tinyerp/erppeek/assignees{/user}","branches_url":"https://api.github.com/repos/tinyerp/erppeek/branches{/branch}","tags_url":"https://api.github.com/repos/tinyerp/erppeek/tags","blobs_url":"https://api.github.com/repos/tinyerp/erppeek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tinyerp/erppeek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tinyerp/erppeek/git/refs{/sha}","trees_url":"https://api.github.com/repos/tinyerp/erppeek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tinyerp/erppeek/statuses/{sha}","languages_url":"https://api.github.com/repos/tinyerp/erppeek/languages","stargazers_url":"https://api.github.com/repos/tinyerp/erppeek/stargazers","contributors_url":"https://api.github.com/repos/tinyerp/erppeek/contributors","subscribers_url":"https://api.github.com/repos/tinyerp/erppeek/subscribers","subscription_url":"https://api.github.com/repos/tinyerp/erppeek/subscription","commits_url":"https://api.github.com/repos/tinyerp/erppeek/commits{/sha}","git_commits_url":"https://api.github.com/repos/tinyerp/erppeek/git/commits{/sha}","comments_url":"https://api.github.com/repos/tinyerp/erppeek/comments{/number}","issue_comment_url":"https://api.github.com/repos/tinyerp/erppeek/issues/comments{/number}","contents_url":"https://api.github.com/repos/tinyerp/erppeek/contents/{+path}","compare_url":"https://api.github.com/repos/tinyerp/erppeek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tinyerp/erppeek/merges","archive_url":"https://api.github.com/repos/tinyerp/erppeek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tinyerp/erppeek/downloads","issues_url":"https://api.github.com/repos/tinyerp/erppeek/issues{/number}","pulls_url":"https://api.github.com/repos/tinyerp/erppeek/pulls{/number}","milestones_url":"https://api.github.com/repos/tinyerp/erppeek/milestones{/number}","notifications_url":"https://api.github.com/repos/tinyerp/erppeek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tinyerp/erppeek/labels{/name}","releases_url":"https://api.github.com/repos/tinyerp/erppeek/releases{/id}","deployments_url":"https://api.github.com/repos/tinyerp/erppeek/deployments","created_at":"2012-03-25T20:12:33Z","updated_at":"2018-09-27T06:49:23Z","pushed_at":"2018-03-20T15:17:46Z","git_url":"git://github.com/tinyerp/erppeek.git","ssh_url":"git@github.com:tinyerp/erppeek.git","clone_url":"https://github.com/tinyerp/erppeek.git","svn_url":"https://github.com/tinyerp/erppeek","homepage":"http://pypi.python.org/pypi/ERPpeek","size":382,"stargazers_count":137,"watchers_count":137,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":73,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":73,"open_issues":26,"watchers":137,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/101"},"html":{"href":"https://github.com/tinyerp/erppeek/pull/101"},"issue":{"href":"https://api.github.com/repos/tinyerp/erppeek/issues/101"},"comments":{"href":"https://api.github.com/repos/tinyerp/erppeek/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tinyerp/erppeek/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/tinyerp/erppeek/statuses/bb4302b7ba71d5dcae428fa82ba815a61cf33297"}},"author_association":"NONE"}}
{"actor":{"display_login":"eberloso"}}