{"action":"created","comment":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments/196867629","pull_request_review_id":130500888,"id":196867629,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Njg2NzYyOQ==","diff_hunk":"@@ -123,45 +125,39 @@ def new_stig_overlay(xccdftree, ssgtree, outfile,\n     print(\"\\nGenerated the new STIG overlay file: %s\" % outfile)\n \n \n-def parse_options():\n-    usage = \"usage: %prog [options]\"\n-    parser = optparse.OptionParser(usage=usage, version=\"%prog \")\n-    # only some options are on by default\n-    parser.add_option(\"--ssg-xccdf\", default=False,\n-                      action=\"store\", dest=\"ssg_xccdf_filename\",\n-                      help=\"A SSG generated XCCDF file. \\\n-                            For example: ssg-rhel6-xccdf.xml\")\n-    parser.add_option(\"--disa-xccdf\", default=False,\n-                      action=\"store\", dest=\"disa_xccdf_filename\",\n-                      help=\"A DISA generated XCCDF Manual checks file. \\\n-                            For example: disa-stig-rhel6-v1r12-xccdf-manual.xml\")\n-    parser.add_option(\"-o\", \"--output\", default=outfile,\n-                      action=\"store\", dest=\"output_file\",\n-                      help=\"STIG overlay XML content file \\\n-                           [default: %default]\")\n-    (options, args) = parser.parse_args()\n-\n-    if not options.disa_xccdf_filename:\n-        parser.print_help()\n-        sys.exit(1)\n+def parse_args():\n+    parser = argparse.ArgumentParser()\n+    parser.add_argument(\"--disa-xccdf\", default=False, required=True,\n+                        action=\"store\", dest=\"disa_xccdf_filename\",\n+                        help=\"A DISA generated XCCDF Manual checks file. \\\n+                              For example: disa-stig-rhel6-v1r12-xccdf-manual.xml\")\n+    parser.add_argument(\"--ssg-xccdf\", default=None,\n+                        action=\"store\", dest=\"ssg_xccdf_filename\",\n+                        help=\"A SSG generated XCCDF file. \\\n+                              For example: ssg-rhel6-xccdf.xml\")\n+    parser.add_argument(\"-o\", \"--output\", default=outfile,\n+                        action=\"store\", dest=\"output_file\",\n+                        help=\"STIG overlay XML content file \\\n+                             [default: %default]\")\n+    args = parser.parse_args()","path":"utils/create-stig-overlay.py","position":53,"original_position":53,"commit_id":"e41e4f70a2f1bd6b2fd8375cc2f4726438e91f1c","original_commit_id":"e41e4f70a2f1bd6b2fd8375cc2f4726438e91f1c","user":{"login":"mpreisler","id":753153,"node_id":"MDQ6VXNlcjc1MzE1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/753153?v=4","gravatar_id":"","url":"https://api.github.com/users/mpreisler","html_url":"https://github.com/mpreisler","followers_url":"https://api.github.com/users/mpreisler/followers","following_url":"https://api.github.com/users/mpreisler/following{/other_user}","gists_url":"https://api.github.com/users/mpreisler/gists{/gist_id}","starred_url":"https://api.github.com/users/mpreisler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpreisler/subscriptions","organizations_url":"https://api.github.com/users/mpreisler/orgs","repos_url":"https://api.github.com/users/mpreisler/repos","events_url":"https://api.github.com/users/mpreisler/events{/privacy}","received_events_url":"https://api.github.com/users/mpreisler/received_events","type":"User","site_admin":false},"body":"return this, you never use `args` again anyway","created_at":"2018-06-20T17:14:31Z","updated_at":"2018-06-20T17:14:31Z","html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2994#discussion_r196867629","pull_request_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments/196867629"},"html":{"href":"https://github.com/OpenSCAP/scap-security-guide/pull/2994#discussion_r196867629"},"pull_request":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994"}}},"pull_request":{"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994","id":196143232,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MTQzMjMy","html_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2994","diff_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2994.diff","patch_url":"https://github.com/OpenSCAP/scap-security-guide/pull/2994.patch","issue_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2994","number":2994,"state":"open","locked":false,"title":"Parse args utils","user":{"login":"cipherboy","id":914030,"node_id":"MDQ6VXNlcjkxNDAzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/914030?v=4","gravatar_id":"","url":"https://api.github.com/users/cipherboy","html_url":"https://github.com/cipherboy","followers_url":"https://api.github.com/users/cipherboy/followers","following_url":"https://api.github.com/users/cipherboy/following{/other_user}","gists_url":"https://api.github.com/users/cipherboy/gists{/gist_id}","starred_url":"https://api.github.com/users/cipherboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cipherboy/subscriptions","organizations_url":"https://api.github.com/users/cipherboy/orgs","repos_url":"https://api.github.com/users/cipherboy/repos","events_url":"https://api.github.com/users/cipherboy/events{/privacy}","received_events_url":"https://api.github.com/users/cipherboy/received_events","type":"User","site_admin":false},"body":"This is part of the #2949 series of PRs.\r\n\r\nBefore converting everything into a module and rearranging the entire source files, I felt some cleanup of `arpgarse` usage in utils was in order. Also fixes some misc. `pep8` issues.\r\n\r\n- Updates `count_oval_objects.py`, `create-stig-overlapy.py`, `find_duplicates.py`, `fix_shadowed_files.py`, `fix-rules.py`, and `upload_ansible_roles_to_galaxy.py`.","created_at":"2018-06-20T13:39:27Z","updated_at":"2018-06-20T17:14:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9995105370003c73b136f8d316d02aceb1c0a6ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":913378788,"node_id":"MDU6TGFiZWw5MTMzNzg3ODg=","url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/labels/refactoring","name":"refactoring","color":"82e5a6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994/commits","review_comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994/comments","review_comment_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2994/comments","statuses_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/e41e4f70a2f1bd6b2fd8375cc2f4726438e91f1c","head":{"label":"cipherboy:parse-args-utils","ref":"parse-args-utils","sha":"e41e4f70a2f1bd6b2fd8375cc2f4726438e91f1c","user":{"login":"cipherboy","id":914030,"node_id":"MDQ6VXNlcjkxNDAzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/914030?v=4","gravatar_id":"","url":"https://api.github.com/users/cipherboy","html_url":"https://github.com/cipherboy","followers_url":"https://api.github.com/users/cipherboy/followers","following_url":"https://api.github.com/users/cipherboy/following{/other_user}","gists_url":"https://api.github.com/users/cipherboy/gists{/gist_id}","starred_url":"https://api.github.com/users/cipherboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cipherboy/subscriptions","organizations_url":"https://api.github.com/users/cipherboy/orgs","repos_url":"https://api.github.com/users/cipherboy/repos","events_url":"https://api.github.com/users/cipherboy/events{/privacy}","received_events_url":"https://api.github.com/users/cipherboy/received_events","type":"User","site_admin":false},"repo":{"id":136047739,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYwNDc3Mzk=","name":"scap-security-guide","full_name":"cipherboy/scap-security-guide","owner":{"login":"cipherboy","id":914030,"node_id":"MDQ6VXNlcjkxNDAzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/914030?v=4","gravatar_id":"","url":"https://api.github.com/users/cipherboy","html_url":"https://github.com/cipherboy","followers_url":"https://api.github.com/users/cipherboy/followers","following_url":"https://api.github.com/users/cipherboy/following{/other_user}","gists_url":"https://api.github.com/users/cipherboy/gists{/gist_id}","starred_url":"https://api.github.com/users/cipherboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cipherboy/subscriptions","organizations_url":"https://api.github.com/users/cipherboy/orgs","repos_url":"https://api.github.com/users/cipherboy/repos","events_url":"https://api.github.com/users/cipherboy/events{/privacy}","received_events_url":"https://api.github.com/users/cipherboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cipherboy/scap-security-guide","description":"Baseline compliance content in SCAP formats","fork":true,"url":"https://api.github.com/repos/cipherboy/scap-security-guide","forks_url":"https://api.github.com/repos/cipherboy/scap-security-guide/forks","keys_url":"https://api.github.com/repos/cipherboy/scap-security-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cipherboy/scap-security-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cipherboy/scap-security-guide/teams","hooks_url":"https://api.github.com/repos/cipherboy/scap-security-guide/hooks","issue_events_url":"https://api.github.com/repos/cipherboy/scap-security-guide/issues/events{/number}","events_url":"https://api.github.com/repos/cipherboy/scap-security-guide/events","assignees_url":"https://api.github.com/repos/cipherboy/scap-security-guide/assignees{/user}","branches_url":"https://api.github.com/repos/cipherboy/scap-security-guide/branches{/branch}","tags_url":"https://api.github.com/repos/cipherboy/scap-security-guide/tags","blobs_url":"https://api.github.com/repos/cipherboy/scap-security-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cipherboy/scap-security-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cipherboy/scap-security-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/cipherboy/scap-security-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cipherboy/scap-security-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/cipherboy/scap-security-guide/languages","stargazers_url":"https://api.github.com/repos/cipherboy/scap-security-guide/stargazers","contributors_url":"https://api.github.com/repos/cipherboy/scap-security-guide/contributors","subscribers_url":"https://api.github.com/repos/cipherboy/scap-security-guide/subscribers","subscription_url":"https://api.github.com/repos/cipherboy/scap-security-guide/subscription","commits_url":"https://api.github.com/repos/cipherboy/scap-security-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/cipherboy/scap-security-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/cipherboy/scap-security-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/cipherboy/scap-security-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/cipherboy/scap-security-guide/contents/{+path}","compare_url":"https://api.github.com/repos/cipherboy/scap-security-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cipherboy/scap-security-guide/merges","archive_url":"https://api.github.com/repos/cipherboy/scap-security-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cipherboy/scap-security-guide/downloads","issues_url":"https://api.github.com/repos/cipherboy/scap-security-guide/issues{/number}","pulls_url":"https://api.github.com/repos/cipherboy/scap-security-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/cipherboy/scap-security-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/cipherboy/scap-security-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cipherboy/scap-security-guide/labels{/name}","releases_url":"https://api.github.com/repos/cipherboy/scap-security-guide/releases{/id}","deployments_url":"https://api.github.com/repos/cipherboy/scap-security-guide/deployments","created_at":"2018-06-04T15:44:48Z","updated_at":"2018-06-20T15:36:14Z","pushed_at":"2018-06-20T15:36:31Z","git_url":"git://github.com/cipherboy/scap-security-guide.git","ssh_url":"git@github.com:cipherboy/scap-security-guide.git","clone_url":"https://github.com/cipherboy/scap-security-guide.git","svn_url":"https://github.com/cipherboy/scap-security-guide","homepage":"https://www.open-scap.org/security-policies/scap-security-guide","size":23082,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenSCAP:master","ref":"master","sha":"bbb8e7b2a5187cb4ca48cabe48bd2c2c12fc0def","user":{"login":"OpenSCAP","id":7439934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzk5MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7439934?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSCAP","html_url":"https://github.com/OpenSCAP","followers_url":"https://api.github.com/users/OpenSCAP/followers","following_url":"https://api.github.com/users/OpenSCAP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSCAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSCAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSCAP/subscriptions","organizations_url":"https://api.github.com/users/OpenSCAP/orgs","repos_url":"https://api.github.com/users/OpenSCAP/repos","events_url":"https://api.github.com/users/OpenSCAP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSCAP/received_events","type":"Organization","site_admin":false},"repo":{"id":19279458,"node_id":"MDEwOlJlcG9zaXRvcnkxOTI3OTQ1OA==","name":"scap-security-guide","full_name":"OpenSCAP/scap-security-guide","owner":{"login":"OpenSCAP","id":7439934,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0Mzk5MzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7439934?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSCAP","html_url":"https://github.com/OpenSCAP","followers_url":"https://api.github.com/users/OpenSCAP/followers","following_url":"https://api.github.com/users/OpenSCAP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSCAP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSCAP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSCAP/subscriptions","organizations_url":"https://api.github.com/users/OpenSCAP/orgs","repos_url":"https://api.github.com/users/OpenSCAP/repos","events_url":"https://api.github.com/users/OpenSCAP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSCAP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSCAP/scap-security-guide","description":"Baseline compliance content in SCAP formats","fork":false,"url":"https://api.github.com/repos/OpenSCAP/scap-security-guide","forks_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/forks","keys_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/teams","hooks_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/hooks","issue_events_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/events","assignees_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/tags","blobs_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/languages","stargazers_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/stargazers","contributors_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/contributors","subscribers_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/subscribers","subscription_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/subscription","commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/merges","archive_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/downloads","issues_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/labels{/name}","releases_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSCAP/scap-security-guide/deployments","created_at":"2014-04-29T14:32:02Z","updated_at":"2018-06-20T17:04:21Z","pushed_at":"2018-06-20T17:04:17Z","git_url":"git://github.com/OpenSCAP/scap-security-guide.git","ssh_url":"git@github.com:OpenSCAP/scap-security-guide.git","clone_url":"https://github.com/OpenSCAP/scap-security-guide.git","svn_url":"https://github.com/OpenSCAP/scap-security-guide","homepage":"https://www.open-scap.org/security-policies/scap-security-guide","size":23039,"stargazers_count":414,"watchers_count":414,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":223,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":223,"open_issues":150,"watchers":414,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994"},"html":{"href":"https://github.com/OpenSCAP/scap-security-guide/pull/2994"},"issue":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2994"},"comments":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/issues/2994/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/pulls/2994/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSCAP/scap-security-guide/statuses/e41e4f70a2f1bd6b2fd8375cc2f4726438e91f1c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mpreisler"}}