{"action":"closed","number":38779,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/38779","id":101886060,"html_url":"https://github.com/saltstack/salt/pull/38779","diff_url":"https://github.com/saltstack/salt/pull/38779.diff","patch_url":"https://github.com/saltstack/salt/pull/38779.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/38779","number":38779,"state":"closed","locked":false,"title":"win_lgpo handle errors when 'encoding=\"unicode\"' exists in ADMX file","user":{"login":"lomeroe","id":8835244,"avatar_url":"https://avatars.githubusercontent.com/u/8835244?v=3","gravatar_id":"","url":"https://api.github.com/users/lomeroe","html_url":"https://github.com/lomeroe","followers_url":"https://api.github.com/users/lomeroe/followers","following_url":"https://api.github.com/users/lomeroe/following{/other_user}","gists_url":"https://api.github.com/users/lomeroe/gists{/gist_id}","starred_url":"https://api.github.com/users/lomeroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lomeroe/subscriptions","organizations_url":"https://api.github.com/users/lomeroe/orgs","repos_url":"https://api.github.com/users/lomeroe/repos","events_url":"https://api.github.com/users/lomeroe/events{/privacy}","received_events_url":"https://api.github.com/users/lomeroe/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nAddresses an underlying issue with lxml on windows in which xml files with \"encoding='unicode'\" in the xml header cannot be processed (throws an xml syntax error).  If an xml file with the \"encoding='unicode'\" is encountered, the module will attempt to remove this from the xml header and parse the file, if the parse succeeds (using utf-16 encoding) the module continues.  If the parse fails, the module will log an error message that the file could not be processed and the entries from that admx/l file will not be available through the module.\r\n\r\n### What issues does this PR fix or reference?\r\n#38100\r\n\r\n### Previous Behavior\r\nWhen an admx file with \"encoding='unicode'\" in the xml header was parsed, an exception would be thrown and the module would exit\r\n\r\n### New Behavior\r\n If an xml file with the \"encoding='unicode'\" is encountered, the module will attempt to remove this from the xml header and parse the file, if the parse succeeds the module continues.  If the parse fails, the module will log an error message that the file could not be processed and the entries from that admx/l file will not be available through the module.\r\n\r\n### Tests written?\r\nNo\r\n\r\nPlease review [Salt's Contributing Guide](https://docs.saltstack.com/en/latest/topics/development/contributing.html) for best practices.\r\n","created_at":"2017-01-17T15:31:20Z","updated_at":"2017-01-20T20:45:49Z","closed_at":"2017-01-20T20:45:49Z","merged_at":"2017-01-20T20:45:49Z","merge_commit_sha":"86c0be597c59a055b925d65b9077b4064911992b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/38779/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/38779/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/38779/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/d71ffcf4f3c5e2c4992c2094847f202f4492237c","head":{"label":"lomeroe:win_lgpo_ignore_badxml_admx_files","ref":"win_lgpo_ignore_badxml_admx_files","sha":"d71ffcf4f3c5e2c4992c2094847f202f4492237c","user":{"login":"lomeroe","id":8835244,"avatar_url":"https://avatars.githubusercontent.com/u/8835244?v=3","gravatar_id":"","url":"https://api.github.com/users/lomeroe","html_url":"https://github.com/lomeroe","followers_url":"https://api.github.com/users/lomeroe/followers","following_url":"https://api.github.com/users/lomeroe/following{/other_user}","gists_url":"https://api.github.com/users/lomeroe/gists{/gist_id}","starred_url":"https://api.github.com/users/lomeroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lomeroe/subscriptions","organizations_url":"https://api.github.com/users/lomeroe/orgs","repos_url":"https://api.github.com/users/lomeroe/repos","events_url":"https://api.github.com/users/lomeroe/events{/privacy}","received_events_url":"https://api.github.com/users/lomeroe/received_events","type":"User","site_admin":false},"repo":{"id":42666912,"name":"salt","full_name":"lomeroe/salt","owner":{"login":"lomeroe","id":8835244,"avatar_url":"https://avatars.githubusercontent.com/u/8835244?v=3","gravatar_id":"","url":"https://api.github.com/users/lomeroe","html_url":"https://github.com/lomeroe","followers_url":"https://api.github.com/users/lomeroe/followers","following_url":"https://api.github.com/users/lomeroe/following{/other_user}","gists_url":"https://api.github.com/users/lomeroe/gists{/gist_id}","starred_url":"https://api.github.com/users/lomeroe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lomeroe/subscriptions","organizations_url":"https://api.github.com/users/lomeroe/orgs","repos_url":"https://api.github.com/users/lomeroe/repos","events_url":"https://api.github.com/users/lomeroe/events{/privacy}","received_events_url":"https://api.github.com/users/lomeroe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lomeroe/salt","description":"Infrastructure automation and management system","fork":true,"url":"https://api.github.com/repos/lomeroe/salt","forks_url":"https://api.github.com/repos/lomeroe/salt/forks","keys_url":"https://api.github.com/repos/lomeroe/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lomeroe/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lomeroe/salt/teams","hooks_url":"https://api.github.com/repos/lomeroe/salt/hooks","issue_events_url":"https://api.github.com/repos/lomeroe/salt/issues/events{/number}","events_url":"https://api.github.com/repos/lomeroe/salt/events","assignees_url":"https://api.github.com/repos/lomeroe/salt/assignees{/user}","branches_url":"https://api.github.com/repos/lomeroe/salt/branches{/branch}","tags_url":"https://api.github.com/repos/lomeroe/salt/tags","blobs_url":"https://api.github.com/repos/lomeroe/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lomeroe/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lomeroe/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/lomeroe/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lomeroe/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/lomeroe/salt/languages","stargazers_url":"https://api.github.com/repos/lomeroe/salt/stargazers","contributors_url":"https://api.github.com/repos/lomeroe/salt/contributors","subscribers_url":"https://api.github.com/repos/lomeroe/salt/subscribers","subscription_url":"https://api.github.com/repos/lomeroe/salt/subscription","commits_url":"https://api.github.com/repos/lomeroe/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/lomeroe/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/lomeroe/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/lomeroe/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/lomeroe/salt/contents/{+path}","compare_url":"https://api.github.com/repos/lomeroe/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lomeroe/salt/merges","archive_url":"https://api.github.com/repos/lomeroe/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lomeroe/salt/downloads","issues_url":"https://api.github.com/repos/lomeroe/salt/issues{/number}","pulls_url":"https://api.github.com/repos/lomeroe/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/lomeroe/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/lomeroe/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lomeroe/salt/labels{/name}","releases_url":"https://api.github.com/repos/lomeroe/salt/releases{/id}","deployments_url":"https://api.github.com/repos/lomeroe/salt/deployments","created_at":"2015-09-17T16:13:36Z","updated_at":"2015-09-17T16:13:47Z","pushed_at":"2017-01-17T22:17:34Z","git_url":"git://github.com/lomeroe/salt.git","ssh_url":"git@github.com:lomeroe/salt.git","clone_url":"https://github.com/lomeroe/salt.git","svn_url":"https://github.com/lomeroe/salt","homepage":"saltstack.com","size":151070,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"saltstack:develop","ref":"develop","sha":"41cfcf2fdbd9e2632827bb780699eb2725836493","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2017-01-20T11:22:27Z","pushed_at":"2017-01-20T20:45:49Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":153392,"stargazers_count":7280,"watchers_count":7280,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3340,"mirror_url":null,"open_issues_count":4188,"forks":3340,"open_issues":4188,"watchers":7280,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38779"},"html":{"href":"https://github.com/saltstack/salt/pull/38779"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/38779"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/38779/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38779/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38779/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/d71ffcf4f3c5e2c4992c2094847f202f4492237c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cachedout","id":111616,"avatar_url":"https://avatars.githubusercontent.com/u/111616?v=3","gravatar_id":"","url":"https://api.github.com/users/cachedout","html_url":"https://github.com/cachedout","followers_url":"https://api.github.com/users/cachedout/followers","following_url":"https://api.github.com/users/cachedout/following{/other_user}","gists_url":"https://api.github.com/users/cachedout/gists{/gist_id}","starred_url":"https://api.github.com/users/cachedout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachedout/subscriptions","organizations_url":"https://api.github.com/users/cachedout/orgs","repos_url":"https://api.github.com/users/cachedout/repos","events_url":"https://api.github.com/users/cachedout/events{/privacy}","received_events_url":"https://api.github.com/users/cachedout/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":36,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"cachedout"}}