)]}'
{"id":"openstack%2Fpython-troveclient~349323","triplet_id":"openstack%2Fpython-troveclient~master~Iccb12b394ed7e5da9d38c23a97b61541aa7f7aaa","project":"openstack/python-troveclient","branch":"master","topic":"main-use-sys.exit","hashtags":[],"change_id":"Iccb12b394ed7e5da9d38c23a97b61541aa7f7aaa","subject":"Use sys.exit for main","status":"ABANDONED","created":"2016-08-01 02:30:59.000000000","updated":"2016-08-08 12:43:56.000000000","total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"3ba97caefe79388026df1c35d9e9a3667df163b5","_number":349323,"virtual_id_number":349323,"owner":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"value":0,"date":"2016-08-08 11:25:30.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},{"value":1,"date":"2016-08-01 04:10:10.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"date":"2016-08-08 12:10:39.000000000","_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"permitted_voting_range":{"min":-1,"max":0},"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Backport-Candidate":{"all":[{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"}],"values":{"-1":"Not A Backport Candidate"," 0":"Backport Review Needed","+1":"Proposed Backport"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2016-08-01 04:10:10.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"},{"updated":"2016-08-08 11:25:30.000000000","updated_by":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"reviewer":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"state":"REVIEWER"}],"messages":[{"id":"d3023309864f44f419600fd851e1cc57a1d7ee23","author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"date":"2016-08-01 02:30:59.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"31d19a3c9c47e1d8d8e81a7f069304d6cd5e60bc","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-08-01 04:10:10.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-troveclient-docs-ubuntu-xenial http://docs-draft.openstack.org/23/349323/1/check/gate-python-troveclient-docs-ubuntu-xenial/751835d//doc/build/html/ : SUCCESS in 4m 25s\n- gate-python-troveclient-pep8-ubuntu-xenial http://logs.openstack.org/23/349323/1/check/gate-python-troveclient-pep8-ubuntu-xenial/e30830a/ : SUCCESS in 4m 44s\n- gate-python-troveclient-python27-ubuntu-xenial http://logs.openstack.org/23/349323/1/check/gate-python-troveclient-python27-ubuntu-xenial/72c125d/ : SUCCESS in 3m 25s\n- gate-python-troveclient-python34 http://logs.openstack.org/23/349323/1/check/gate-python-troveclient-python34/03812ef/ : SUCCESS in 3m 59s\n- gate-python-troveclient-python35-nv http://logs.openstack.org/23/349323/1/check/gate-python-troveclient-python35-nv/bb3e322/ : SUCCESS in 3m 55s (non-voting)\n- gate-python-troveclient-pypy http://logs.openstack.org/23/349323/1/check/gate-python-troveclient-pypy/8acd833/ : FAILURE in 3m 11s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-troveclient http://logs.openstack.org/23/349323/1/check/gate-tempest-dsvm-neutron-src-python-troveclient/6ffaf6e/ : SUCCESS in 1h 14m 07s\n- gate-trove-functional-dsvm-mysql http://logs.openstack.org/23/349323/1/check/gate-trove-functional-dsvm-mysql/3243a20/ : SUCCESS in 1h 36m 07s","accounts_in_message":[],"_revision_number":1},{"id":"a49838df0f413a18e5669335dde909fafce214d7","author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"date":"2016-08-08 11:25:30.000000000","message":"Patch Set 1:\n\nSeveral things.\n\n1. I don\u0027t see any benefit from this change. Either way, the interpreter will exit.\n\n2. The commit message has been (literally) lifted from the webpage that is provided but it adds no real information on why this change is a good thing.\n\nwithout some explanation of how the system behaves differently with this change, I see no good reason to take it; benign as it appears.\n\nAs a point of reference, Nova does exactly what we do in Trove, but neutron does exactly what this commit proposes. So which is better?","accounts_in_message":[],"_revision_number":1},{"id":"8934254a668cf0fefbf2b4fbe0699bd1a35fddcc","author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"date":"2016-08-08 12:10:39.000000000","message":"Patch Set 1:\n\n\u003e Several things.\n \u003e \n \u003e 1. I don\u0027t see any benefit from this change. Either way, the\n \u003e interpreter will exit.\n \u003e \n \u003e 2. The commit message has been (literally) lifted from the webpage\n \u003e that is provided but it adds no real information on why this change\n \u003e is a good thing.\n \u003e \n \u003e without some explanation of how the system behaves differently with\n \u003e this change, I see no good reason to take it; benign as it appears.\n \u003e \n \u003e As a point of reference, Nova does exactly what we do in Trove, but\n \u003e neutron does exactly what this commit proposes. So which is better?\n\nMaybe my explanation is not clear... I\u0027m here to see... https://review.openstack.org/#/c/349196/,the commit message is :sys.exit() calls in main() will make the interactive\npython interpreter exit. We can call the main() as\nbelow to avoid to exit the interactive interpreter,\nand specify the return value of main() in the exit\ncode at the same time.\n\nsys.exit(main())","accounts_in_message":[],"_revision_number":1},{"id":"21a918a48ac4d0737205c7ef3f2675fe4990d104","author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"date":"2016-08-08 12:20:35.000000000","message":"Patch Set 1:\n\nSo, my question is still the same, what is the benefit?\n\nDo you run trove client through the python interpreter?\n\nThe interesting part of the referenced commit ( https://review.openstack.org/#/c/349196/1) is the commit message on patch set 1.\n\nUnless one were to be running the trove client with the interpreter, this provides little benefit. On the other hand, if like most people you run the command directly, the end result is the same; you get the right exit code.\n\nSo I will say this again, I don\u0027t see what the benefit is of this change. See below.\n\namrith@amrith-work:~/source$ cat t1.py\nimport sys\n\ndef main():\n    sys.exit(100)\n\nmain()\namrith@amrith-work:~/source$ python t1.py\namrith@amrith-work:~/source$ echo $?\n100\namrith@amrith-work:~/source$ cat t2.py\n#!/usr/bin/python\nimport sys\n\ndef main():\n    return 100\n\nsys.exit(main())\namrith@amrith-work:~/source$ chmod +x ./t2.py\namrith@amrith-work:~/source$ ./t2.py\namrith@amrith-work:~/source$ echo $?\n100\namrith@amrith-work:~/source$","accounts_in_message":[],"_revision_number":1},{"id":"7cc9d0a37ad7a83b1494823402f71dc2215cbaf4","author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"date":"2016-08-08 12:43:45.000000000","message":"Patch Set 1:\n\n\u003e So, my question is still the same, what is the benefit?\n \u003e \n \u003e Do you run trove client through the python interpreter?\n \u003e \n \u003e The interesting part of the referenced commit ( https://review.openstack.org/#/c/349196/1)\n \u003e is the commit message on patch set 1.\n \u003e \n \u003e Unless one were to be running the trove client with the\n \u003e interpreter, this provides little benefit. On the other hand, if\n \u003e like most people you run the command directly, the end result is\n \u003e the same; you get the right exit code.\n \u003e \n \u003e So I will say this again, I don\u0027t see what the benefit is of this\n \u003e change. See below.\n \u003e \n \u003e amrith@amrith-work:~/source$ cat t1.py\n \u003e import sys\n \u003e \n \u003e def main():\n \u003e sys.exit(100)\n \u003e \n \u003e main()\n \u003e amrith@amrith-work:~/source$ python t1.py\n \u003e amrith@amrith-work:~/source$ echo $?\n \u003e 100\n \u003e amrith@amrith-work:~/source$ cat t2.py\n \u003e #!/usr/bin/python\n \u003e import sys\n \u003e \n \u003e def main():\n \u003e return 100\n \u003e \n \u003e sys.exit(main())\n \u003e amrith@amrith-work:~/source$ chmod +x ./t2.py\n \u003e amrith@amrith-work:~/source$ ./t2.py\n \u003e amrith@amrith-work:~/source$ echo $?\n \u003e 100\n \u003e amrith@amrith-work:~/source$\nSo...thank you, I understand..","accounts_in_message":[],"_revision_number":1},{"id":"bf0e2939547bd5320866d4f2761befb6c7a46e15","author":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"date":"2016-08-08 12:43:56.000000000","message":"Abandoned","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"c3befba4491b2b399d0d695c18b35527f8dcf311","revisions":{"c3befba4491b2b399d0d695c18b35527f8dcf311":{"kind":"REWORK","_number":1,"created":"2016-08-01 02:30:59.000000000","uploader":{"_account_id":22694,"name":"jian.song","email":"jiansong19941206@gmail.com","username":"jiansong"},"ref":"refs/changes/23/349323/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-troveclient","ref":"refs/changes/23/349323/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/23/349323/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/23/349323/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/23/349323/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-troveclient refs/changes/23/349323/1"}}},"commit":{"parents":[{"commit":"49c6fa13deab729cb328dbfcead0bc0ffb6018a9","subject":"Updated from global requirements","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/49c6fa13deab729cb328dbfcead0bc0ffb6018a9"}]}],"author":{"name":"jiansong","email":"jian.song@easystack.cn","date":"2016-08-01 02:27:49.000000000","tz":-420},"committer":{"name":"jiansong","email":"jian.song@easystack.cn","date":"2016-08-01 02:27:49.000000000","tz":-420},"subject":"Use sys.exit for main","message":"Use sys.exit for main\n\nNow the sys.exit() calls are annoying: when main() calls sys.exit()\n, your interactive Python interpreter will exit! The remedy is to\nlet main()\u0027s return value specify the exit status.\n\nmore information:http://www.artima.com/weblogs/viewpost.jsp?thread\u003d4829\n\nChange-Id: Iccb12b394ed7e5da9d38c23a97b61541aa7f7aaa\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/c3befba4491b2b399d0d695c18b35527f8dcf311"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/c3befba4491b2b399d0d695c18b35527f8dcf311"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
