{"action":"created","comment":{"url":"https://api.github.com/repos/Thynix/RelayBot/pulls/comments/31816693","id":31816693,"diff_hunk":"@@ -52,7 +53,15 @@ def get(option):\n             options[\"nickServPassword\"] = get(\"nickServPassword\")\r\n \r\n         factory = factory(options)\r\n-        reactor.connectTCP(options['host'], int(options['port']), factory, int(options['timeout']))\r\n+        optionAsBoolean = { \"\": False, \"false\": False, \"no\": False, \"true\": True, \"yes\": True }\r\n+        sentinel = object()\r\n+        ssl = options.get('ssl', sentinel)\r\n+        if(sentinel == ssl):\r","path":"relaybot.py","position":25,"original_position":25,"commit_id":"0d9d4a5350fbb3c35c6ca7cbab1eb7b4f79affa2","original_commit_id":"0d9d4a5350fbb3c35c6ca7cbab1eb7b4f79affa2","user":{"login":"Thynix","id":199917,"avatar_url":"https://avatars.githubusercontent.com/u/199917?v=3","gravatar_id":"","url":"https://api.github.com/users/Thynix","html_url":"https://github.com/Thynix","followers_url":"https://api.github.com/users/Thynix/followers","following_url":"https://api.github.com/users/Thynix/following{/other_user}","gists_url":"https://api.github.com/users/Thynix/gists{/gist_id}","starred_url":"https://api.github.com/users/Thynix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thynix/subscriptions","organizations_url":"https://api.github.com/users/Thynix/orgs","repos_url":"https://api.github.com/users/Thynix/repos","events_url":"https://api.github.com/users/Thynix/events{/privacy}","received_events_url":"https://api.github.com/users/Thynix/received_events","type":"User","site_admin":false},"body":"Does it work better to go with explicit membership checks?\r\n\r\n    ssl = options['ssl']\r\n    if ssl in optionAsBoolean:\r\n        if optionAsBoolean[ssl]:\r\n            reactor.connectSSL(options['host'], int(options['port']), factory, ClientContextFactory(), int(options['timeout']))\r\n        else:\r\n            reactor.connectTCP(options['host'], int(options['port']), factory, int(options['timeout']))\r\n    else:\r\n        raise TypeError(\"Cannot convert '{}' to boolean.\".format(ssl))","created_at":"2015-06-05T14:28:17Z","updated_at":"2015-06-05T14:28:17Z","html_url":"https://github.com/Thynix/RelayBot/pull/1#discussion_r31816693","pull_request_url":"https://api.github.com/repos/Thynix/RelayBot/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/comments/31816693"},"html":{"href":"https://github.com/Thynix/RelayBot/pull/1#discussion_r31816693"},"pull_request":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Thynix/RelayBot/pulls/1","id":34454455,"html_url":"https://github.com/Thynix/RelayBot/pull/1","diff_url":"https://github.com/Thynix/RelayBot/pull/1.diff","patch_url":"https://github.com/Thynix/RelayBot/pull/1.patch","issue_url":"https://api.github.com/repos/Thynix/RelayBot/issues/1","number":1,"state":"open","locked":false,"title":"Add ssl support","user":{"login":"m50d","id":1283489,"avatar_url":"https://avatars.githubusercontent.com/u/1283489?v=3","gravatar_id":"","url":"https://api.github.com/users/m50d","html_url":"https://github.com/m50d","followers_url":"https://api.github.com/users/m50d/followers","following_url":"https://api.github.com/users/m50d/following{/other_user}","gists_url":"https://api.github.com/users/m50d/gists{/gist_id}","starred_url":"https://api.github.com/users/m50d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m50d/subscriptions","organizations_url":"https://api.github.com/users/m50d/orgs","repos_url":"https://api.github.com/users/m50d/repos","events_url":"https://api.github.com/users/m50d/events{/privacy}","received_events_url":"https://api.github.com/users/m50d/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-30T12:24:14Z","updated_at":"2015-06-05T14:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7733bb2baf7f3b60a96edfbf554ead00e496226e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Thynix/RelayBot/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Thynix/RelayBot/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Thynix/RelayBot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Thynix/RelayBot/issues/1/comments","statuses_url":"https://api.github.com/repos/Thynix/RelayBot/statuses/0d9d4a5350fbb3c35c6ca7cbab1eb7b4f79affa2","head":{"label":"m50d:master","ref":"master","sha":"0d9d4a5350fbb3c35c6ca7cbab1eb7b4f79affa2","user":{"login":"m50d","id":1283489,"avatar_url":"https://avatars.githubusercontent.com/u/1283489?v=3","gravatar_id":"","url":"https://api.github.com/users/m50d","html_url":"https://github.com/m50d","followers_url":"https://api.github.com/users/m50d/followers","following_url":"https://api.github.com/users/m50d/following{/other_user}","gists_url":"https://api.github.com/users/m50d/gists{/gist_id}","starred_url":"https://api.github.com/users/m50d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m50d/subscriptions","organizations_url":"https://api.github.com/users/m50d/orgs","repos_url":"https://api.github.com/users/m50d/repos","events_url":"https://api.github.com/users/m50d/events{/privacy}","received_events_url":"https://api.github.com/users/m50d/received_events","type":"User","site_admin":false},"repo":{"id":34851893,"name":"RelayBot","full_name":"m50d/RelayBot","owner":{"login":"m50d","id":1283489,"avatar_url":"https://avatars.githubusercontent.com/u/1283489?v=3","gravatar_id":"","url":"https://api.github.com/users/m50d","html_url":"https://github.com/m50d","followers_url":"https://api.github.com/users/m50d/followers","following_url":"https://api.github.com/users/m50d/following{/other_user}","gists_url":"https://api.github.com/users/m50d/gists{/gist_id}","starred_url":"https://api.github.com/users/m50d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m50d/subscriptions","organizations_url":"https://api.github.com/users/m50d/orgs","repos_url":"https://api.github.com/users/m50d/repos","events_url":"https://api.github.com/users/m50d/events{/privacy}","received_events_url":"https://api.github.com/users/m50d/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m50d/RelayBot","description":"A minimal IRC bridge/relay bot","fork":true,"url":"https://api.github.com/repos/m50d/RelayBot","forks_url":"https://api.github.com/repos/m50d/RelayBot/forks","keys_url":"https://api.github.com/repos/m50d/RelayBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m50d/RelayBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m50d/RelayBot/teams","hooks_url":"https://api.github.com/repos/m50d/RelayBot/hooks","issue_events_url":"https://api.github.com/repos/m50d/RelayBot/issues/events{/number}","events_url":"https://api.github.com/repos/m50d/RelayBot/events","assignees_url":"https://api.github.com/repos/m50d/RelayBot/assignees{/user}","branches_url":"https://api.github.com/repos/m50d/RelayBot/branches{/branch}","tags_url":"https://api.github.com/repos/m50d/RelayBot/tags","blobs_url":"https://api.github.com/repos/m50d/RelayBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m50d/RelayBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m50d/RelayBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/m50d/RelayBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m50d/RelayBot/statuses/{sha}","languages_url":"https://api.github.com/repos/m50d/RelayBot/languages","stargazers_url":"https://api.github.com/repos/m50d/RelayBot/stargazers","contributors_url":"https://api.github.com/repos/m50d/RelayBot/contributors","subscribers_url":"https://api.github.com/repos/m50d/RelayBot/subscribers","subscription_url":"https://api.github.com/repos/m50d/RelayBot/subscription","commits_url":"https://api.github.com/repos/m50d/RelayBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/m50d/RelayBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/m50d/RelayBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/m50d/RelayBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/m50d/RelayBot/contents/{+path}","compare_url":"https://api.github.com/repos/m50d/RelayBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m50d/RelayBot/merges","archive_url":"https://api.github.com/repos/m50d/RelayBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m50d/RelayBot/downloads","issues_url":"https://api.github.com/repos/m50d/RelayBot/issues{/number}","pulls_url":"https://api.github.com/repos/m50d/RelayBot/pulls{/number}","milestones_url":"https://api.github.com/repos/m50d/RelayBot/milestones{/number}","notifications_url":"https://api.github.com/repos/m50d/RelayBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m50d/RelayBot/labels{/name}","releases_url":"https://api.github.com/repos/m50d/RelayBot/releases{/id}","created_at":"2015-04-30T11:52:51Z","updated_at":"2015-04-30T11:56:15Z","pushed_at":"2015-06-05T12:52:09Z","git_url":"git://github.com/m50d/RelayBot.git","ssh_url":"git@github.com:m50d/RelayBot.git","clone_url":"https://github.com/m50d/RelayBot.git","svn_url":"https://github.com/m50d/RelayBot","homepage":"","size":194,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Thynix:master","ref":"master","sha":"5331fbf20922874e1b9146d32e592c65ac0e41df","user":{"login":"Thynix","id":199917,"avatar_url":"https://avatars.githubusercontent.com/u/199917?v=3","gravatar_id":"","url":"https://api.github.com/users/Thynix","html_url":"https://github.com/Thynix","followers_url":"https://api.github.com/users/Thynix/followers","following_url":"https://api.github.com/users/Thynix/following{/other_user}","gists_url":"https://api.github.com/users/Thynix/gists{/gist_id}","starred_url":"https://api.github.com/users/Thynix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thynix/subscriptions","organizations_url":"https://api.github.com/users/Thynix/orgs","repos_url":"https://api.github.com/users/Thynix/repos","events_url":"https://api.github.com/users/Thynix/events{/privacy}","received_events_url":"https://api.github.com/users/Thynix/received_events","type":"User","site_admin":false},"repo":{"id":3609196,"name":"RelayBot","full_name":"Thynix/RelayBot","owner":{"login":"Thynix","id":199917,"avatar_url":"https://avatars.githubusercontent.com/u/199917?v=3","gravatar_id":"","url":"https://api.github.com/users/Thynix","html_url":"https://github.com/Thynix","followers_url":"https://api.github.com/users/Thynix/followers","following_url":"https://api.github.com/users/Thynix/following{/other_user}","gists_url":"https://api.github.com/users/Thynix/gists{/gist_id}","starred_url":"https://api.github.com/users/Thynix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thynix/subscriptions","organizations_url":"https://api.github.com/users/Thynix/orgs","repos_url":"https://api.github.com/users/Thynix/repos","events_url":"https://api.github.com/users/Thynix/events{/privacy}","received_events_url":"https://api.github.com/users/Thynix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Thynix/RelayBot","description":"A minimal IRC bridge/relay bot","fork":false,"url":"https://api.github.com/repos/Thynix/RelayBot","forks_url":"https://api.github.com/repos/Thynix/RelayBot/forks","keys_url":"https://api.github.com/repos/Thynix/RelayBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Thynix/RelayBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Thynix/RelayBot/teams","hooks_url":"https://api.github.com/repos/Thynix/RelayBot/hooks","issue_events_url":"https://api.github.com/repos/Thynix/RelayBot/issues/events{/number}","events_url":"https://api.github.com/repos/Thynix/RelayBot/events","assignees_url":"https://api.github.com/repos/Thynix/RelayBot/assignees{/user}","branches_url":"https://api.github.com/repos/Thynix/RelayBot/branches{/branch}","tags_url":"https://api.github.com/repos/Thynix/RelayBot/tags","blobs_url":"https://api.github.com/repos/Thynix/RelayBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Thynix/RelayBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Thynix/RelayBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Thynix/RelayBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Thynix/RelayBot/statuses/{sha}","languages_url":"https://api.github.com/repos/Thynix/RelayBot/languages","stargazers_url":"https://api.github.com/repos/Thynix/RelayBot/stargazers","contributors_url":"https://api.github.com/repos/Thynix/RelayBot/contributors","subscribers_url":"https://api.github.com/repos/Thynix/RelayBot/subscribers","subscription_url":"https://api.github.com/repos/Thynix/RelayBot/subscription","commits_url":"https://api.github.com/repos/Thynix/RelayBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Thynix/RelayBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Thynix/RelayBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Thynix/RelayBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Thynix/RelayBot/contents/{+path}","compare_url":"https://api.github.com/repos/Thynix/RelayBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Thynix/RelayBot/merges","archive_url":"https://api.github.com/repos/Thynix/RelayBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Thynix/RelayBot/downloads","issues_url":"https://api.github.com/repos/Thynix/RelayBot/issues{/number}","pulls_url":"https://api.github.com/repos/Thynix/RelayBot/pulls{/number}","milestones_url":"https://api.github.com/repos/Thynix/RelayBot/milestones{/number}","notifications_url":"https://api.github.com/repos/Thynix/RelayBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Thynix/RelayBot/labels{/name}","releases_url":"https://api.github.com/repos/Thynix/RelayBot/releases{/id}","created_at":"2012-03-03T07:07:23Z","updated_at":"2015-01-24T17:56:44Z","pushed_at":"2015-06-05T12:52:09Z","git_url":"git://github.com/Thynix/RelayBot.git","ssh_url":"git@github.com:Thynix/RelayBot.git","clone_url":"https://github.com/Thynix/RelayBot.git","svn_url":"https://github.com/Thynix/RelayBot","homepage":"","size":241,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/1"},"html":{"href":"https://github.com/Thynix/RelayBot/pull/1"},"issue":{"href":"https://api.github.com/repos/Thynix/RelayBot/issues/1"},"comments":{"href":"https://api.github.com/repos/Thynix/RelayBot/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Thynix/RelayBot/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Thynix/RelayBot/statuses/0d9d4a5350fbb3c35c6ca7cbab1eb7b4f79affa2"}}}}