{"action":"created","comment":{"url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/comments/44570347","id":44570347,"diff_hunk":"@@ -67,6 +67,9 @@ def set(self, value):\n \n         # handle known player not set\n \n+        # sadly, allowed_values is faulty - assumes copy() is always\n+        # accessible, causing exception on any string not among allowed_values","path":"mps_youtube/config.py","position":5,"original_position":5,"commit_id":"5717be5181d1f3cc8eacb2327e53d98c7c8258a9","original_commit_id":"f175db7518f8bd92f55789570eb263e646e4552c","user":{"login":"kkrolczyk","id":6330101,"avatar_url":"https://avatars.githubusercontent.com/u/6330101?v=3","gravatar_id":"","url":"https://api.github.com/users/kkrolczyk","html_url":"https://github.com/kkrolczyk","followers_url":"https://api.github.com/users/kkrolczyk/followers","following_url":"https://api.github.com/users/kkrolczyk/following{/other_user}","gists_url":"https://api.github.com/users/kkrolczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kkrolczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkrolczyk/subscriptions","organizations_url":"https://api.github.com/users/kkrolczyk/orgs","repos_url":"https://api.github.com/users/kkrolczyk/repos","events_url":"https://api.github.com/users/kkrolczyk/events{/privacy}","received_events_url":"https://api.github.com/users/kkrolczyk/received_events","type":"User","site_admin":false},"body":"Sure, please check  what happens if user didn't read `help config` careful, or made a typo like this\r\n`set save_history search_onl` (notice missing 'y'). Exception is generated like this:\r\n\r\n```\r\n> set save_history search_onl\r\nTraceback (most recent call last):\r\n  File \"./mpsyt\", line 3, in <module>\r\n    mps_youtube.main.main()\r\n  File \"/tmp/mps-youtube/mps_youtube/main.py\", line 3819, in main\r\n    if matchfunction(k, v, userinput):\r\n  File \"/tmp/mps-youtube/mps_youtube/main.py\", line 3716, in matchfunction\r\n    func(*matches)\r\n  File \"/tmp/mps-youtube/mps_youtube/main.py\", line 471, in setconfig\r\n    message = Config[key.upper()].set(val)\r\n  File \"/tmp/mps-youtube/mps_youtube/config.py\", line 75, in set\r\n    allowed_values = self.allowed_values.copy()\r\nAttributeError: 'list' object has no attribute 'copy'\r\n```\r\n\r\nalso happens when user tries to change user_order and other parameters that accept multiple values.","created_at":"2015-11-11T18:56:13Z","updated_at":"2015-11-11T18:56:13Z","html_url":"https://github.com/mps-youtube/mps-youtube/pull/377#discussion_r44570347","pull_request_url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377","_links":{"self":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/comments/44570347"},"html":{"href":"https://github.com/mps-youtube/mps-youtube/pull/377#discussion_r44570347"},"pull_request":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377"}}},"pull_request":{"url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377","id":50413619,"html_url":"https://github.com/mps-youtube/mps-youtube/pull/377","diff_url":"https://github.com/mps-youtube/mps-youtube/pull/377.diff","patch_url":"https://github.com/mps-youtube/mps-youtube/pull/377.patch","issue_url":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/377","number":377,"state":"open","locked":false,"title":"History fix issue 360","user":{"login":"kkrolczyk","id":6330101,"avatar_url":"https://avatars.githubusercontent.com/u/6330101?v=3","gravatar_id":"","url":"https://api.github.com/users/kkrolczyk","html_url":"https://github.com/kkrolczyk","followers_url":"https://api.github.com/users/kkrolczyk/followers","following_url":"https://api.github.com/users/kkrolczyk/following{/other_user}","gists_url":"https://api.github.com/users/kkrolczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kkrolczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkrolczyk/subscriptions","organizations_url":"https://api.github.com/users/kkrolczyk/orgs","repos_url":"https://api.github.com/users/kkrolczyk/repos","events_url":"https://api.github.com/users/kkrolczyk/events{/privacy}","received_events_url":"https://api.github.com/users/kkrolczyk/received_events","type":"User","site_admin":false},"body":"This patch checks, during mpsyt startup, in init_readline() function if user wants different history behavior. Config.`save_history` can be set to \"all\" (current and previous version default behavior), none, or <nothing>, which disables readline, and \"searches_only\" to filter readline file during each mpsyt startup, leaving only items that were searched for, as described in feature request #360 ","created_at":"2015-11-11T17:48:15Z","updated_at":"2015-11-11T18:56:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78c52e756538211dbc3591d17c048077303c4e29","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377/commits","review_comments_url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377/comments","review_comment_url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/377/comments","statuses_url":"https://api.github.com/repos/mps-youtube/mps-youtube/statuses/5717be5181d1f3cc8eacb2327e53d98c7c8258a9","head":{"label":"kkrolczyk:history_fix_issue_360","ref":"history_fix_issue_360","sha":"5717be5181d1f3cc8eacb2327e53d98c7c8258a9","user":{"login":"kkrolczyk","id":6330101,"avatar_url":"https://avatars.githubusercontent.com/u/6330101?v=3","gravatar_id":"","url":"https://api.github.com/users/kkrolczyk","html_url":"https://github.com/kkrolczyk","followers_url":"https://api.github.com/users/kkrolczyk/followers","following_url":"https://api.github.com/users/kkrolczyk/following{/other_user}","gists_url":"https://api.github.com/users/kkrolczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kkrolczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkrolczyk/subscriptions","organizations_url":"https://api.github.com/users/kkrolczyk/orgs","repos_url":"https://api.github.com/users/kkrolczyk/repos","events_url":"https://api.github.com/users/kkrolczyk/events{/privacy}","received_events_url":"https://api.github.com/users/kkrolczyk/received_events","type":"User","site_admin":false},"repo":{"id":45427701,"name":"mps-youtube","full_name":"kkrolczyk/mps-youtube","owner":{"login":"kkrolczyk","id":6330101,"avatar_url":"https://avatars.githubusercontent.com/u/6330101?v=3","gravatar_id":"","url":"https://api.github.com/users/kkrolczyk","html_url":"https://github.com/kkrolczyk","followers_url":"https://api.github.com/users/kkrolczyk/followers","following_url":"https://api.github.com/users/kkrolczyk/following{/other_user}","gists_url":"https://api.github.com/users/kkrolczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kkrolczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkrolczyk/subscriptions","organizations_url":"https://api.github.com/users/kkrolczyk/orgs","repos_url":"https://api.github.com/users/kkrolczyk/repos","events_url":"https://api.github.com/users/kkrolczyk/events{/privacy}","received_events_url":"https://api.github.com/users/kkrolczyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kkrolczyk/mps-youtube","description":"Terminal based YouTube player and downloader","fork":true,"url":"https://api.github.com/repos/kkrolczyk/mps-youtube","forks_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/forks","keys_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/teams","hooks_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/hooks","issue_events_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/issues/events{/number}","events_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/events","assignees_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/assignees{/user}","branches_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/branches{/branch}","tags_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/tags","blobs_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/git/refs{/sha}","trees_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/statuses/{sha}","languages_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/languages","stargazers_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/stargazers","contributors_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/contributors","subscribers_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/subscribers","subscription_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/subscription","commits_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/commits{/sha}","git_commits_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/git/commits{/sha}","comments_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/comments{/number}","issue_comment_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/issues/comments{/number}","contents_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/contents/{+path}","compare_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/merges","archive_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/downloads","issues_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/issues{/number}","pulls_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/pulls{/number}","milestones_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/milestones{/number}","notifications_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/labels{/name}","releases_url":"https://api.github.com/repos/kkrolczyk/mps-youtube/releases{/id}","created_at":"2015-11-02T22:59:40Z","updated_at":"2015-11-02T22:59:41Z","pushed_at":"2015-11-11T18:52:21Z","git_url":"git://github.com/kkrolczyk/mps-youtube.git","ssh_url":"git@github.com:kkrolczyk/mps-youtube.git","clone_url":"https://github.com/kkrolczyk/mps-youtube.git","svn_url":"https://github.com/kkrolczyk/mps-youtube","homepage":"","size":1741,"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":"mps-youtube:develop","ref":"develop","sha":"6b1bf1f1d4866f6ade8dc0839fa188bef8195e89","user":{"login":"mps-youtube","id":12987682,"avatar_url":"https://avatars.githubusercontent.com/u/12987682?v=3","gravatar_id":"","url":"https://api.github.com/users/mps-youtube","html_url":"https://github.com/mps-youtube","followers_url":"https://api.github.com/users/mps-youtube/followers","following_url":"https://api.github.com/users/mps-youtube/following{/other_user}","gists_url":"https://api.github.com/users/mps-youtube/gists{/gist_id}","starred_url":"https://api.github.com/users/mps-youtube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mps-youtube/subscriptions","organizations_url":"https://api.github.com/users/mps-youtube/orgs","repos_url":"https://api.github.com/users/mps-youtube/repos","events_url":"https://api.github.com/users/mps-youtube/events{/privacy}","received_events_url":"https://api.github.com/users/mps-youtube/received_events","type":"Organization","site_admin":false},"repo":{"id":16469697,"name":"mps-youtube","full_name":"mps-youtube/mps-youtube","owner":{"login":"mps-youtube","id":12987682,"avatar_url":"https://avatars.githubusercontent.com/u/12987682?v=3","gravatar_id":"","url":"https://api.github.com/users/mps-youtube","html_url":"https://github.com/mps-youtube","followers_url":"https://api.github.com/users/mps-youtube/followers","following_url":"https://api.github.com/users/mps-youtube/following{/other_user}","gists_url":"https://api.github.com/users/mps-youtube/gists{/gist_id}","starred_url":"https://api.github.com/users/mps-youtube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mps-youtube/subscriptions","organizations_url":"https://api.github.com/users/mps-youtube/orgs","repos_url":"https://api.github.com/users/mps-youtube/repos","events_url":"https://api.github.com/users/mps-youtube/events{/privacy}","received_events_url":"https://api.github.com/users/mps-youtube/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mps-youtube/mps-youtube","description":"Terminal based YouTube player and downloader","fork":false,"url":"https://api.github.com/repos/mps-youtube/mps-youtube","forks_url":"https://api.github.com/repos/mps-youtube/mps-youtube/forks","keys_url":"https://api.github.com/repos/mps-youtube/mps-youtube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mps-youtube/mps-youtube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mps-youtube/mps-youtube/teams","hooks_url":"https://api.github.com/repos/mps-youtube/mps-youtube/hooks","issue_events_url":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/events{/number}","events_url":"https://api.github.com/repos/mps-youtube/mps-youtube/events","assignees_url":"https://api.github.com/repos/mps-youtube/mps-youtube/assignees{/user}","branches_url":"https://api.github.com/repos/mps-youtube/mps-youtube/branches{/branch}","tags_url":"https://api.github.com/repos/mps-youtube/mps-youtube/tags","blobs_url":"https://api.github.com/repos/mps-youtube/mps-youtube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mps-youtube/mps-youtube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mps-youtube/mps-youtube/git/refs{/sha}","trees_url":"https://api.github.com/repos/mps-youtube/mps-youtube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mps-youtube/mps-youtube/statuses/{sha}","languages_url":"https://api.github.com/repos/mps-youtube/mps-youtube/languages","stargazers_url":"https://api.github.com/repos/mps-youtube/mps-youtube/stargazers","contributors_url":"https://api.github.com/repos/mps-youtube/mps-youtube/contributors","subscribers_url":"https://api.github.com/repos/mps-youtube/mps-youtube/subscribers","subscription_url":"https://api.github.com/repos/mps-youtube/mps-youtube/subscription","commits_url":"https://api.github.com/repos/mps-youtube/mps-youtube/commits{/sha}","git_commits_url":"https://api.github.com/repos/mps-youtube/mps-youtube/git/commits{/sha}","comments_url":"https://api.github.com/repos/mps-youtube/mps-youtube/comments{/number}","issue_comment_url":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/comments{/number}","contents_url":"https://api.github.com/repos/mps-youtube/mps-youtube/contents/{+path}","compare_url":"https://api.github.com/repos/mps-youtube/mps-youtube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mps-youtube/mps-youtube/merges","archive_url":"https://api.github.com/repos/mps-youtube/mps-youtube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mps-youtube/mps-youtube/downloads","issues_url":"https://api.github.com/repos/mps-youtube/mps-youtube/issues{/number}","pulls_url":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls{/number}","milestones_url":"https://api.github.com/repos/mps-youtube/mps-youtube/milestones{/number}","notifications_url":"https://api.github.com/repos/mps-youtube/mps-youtube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mps-youtube/mps-youtube/labels{/name}","releases_url":"https://api.github.com/repos/mps-youtube/mps-youtube/releases{/id}","created_at":"2014-02-03T04:17:46Z","updated_at":"2015-11-11T14:46:15Z","pushed_at":"2015-11-11T18:52:21Z","git_url":"git://github.com/mps-youtube/mps-youtube.git","ssh_url":"git@github.com:mps-youtube/mps-youtube.git","clone_url":"https://github.com/mps-youtube/mps-youtube.git","svn_url":"https://github.com/mps-youtube/mps-youtube","homepage":"","size":4052,"stargazers_count":1331,"watchers_count":1331,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":69,"forks":119,"open_issues":69,"watchers":1331,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377"},"html":{"href":"https://github.com/mps-youtube/mps-youtube/pull/377"},"issue":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/377"},"comments":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/issues/377/comments"},"review_comments":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377/comments"},"review_comment":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/pulls/377/commits"},"statuses":{"href":"https://api.github.com/repos/mps-youtube/mps-youtube/statuses/5717be5181d1f3cc8eacb2327e53d98c7c8258a9"}}}}