{"action":"created","comment":{"url":"https://api.github.com/repos/nio-blocks/mssql/pulls/comments/198310925","pull_request_review_id":132220875,"id":198310925,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODMxMDkyNQ==","diff_hunk":"@@ -5,13 +5,23 @@\n from nio.signal.base import Signal\n from nio.util.discovery import not_discoverable\n \n+driver_name = ''\n+\n+try:\n+  driver_names = [x for x in pyodbc.drivers() if x.endswith(' for SQL Server')]\n+  if driver_names:\n+      driver_name = driver_names[0]\n+  if not driver_name:\n+      raise ReferenceError('No suitable ODBC driver found. Block will not be able to connect to MSSQL DB. View README.md to install driver.')","path":"mssql_base.py","position":11,"original_position":11,"commit_id":"ba938c07bd555a641197062e9370b339a0d87528","original_commit_id":"ba938c07bd555a641197062e9370b339a0d87528","user":{"login":"mattdodge","id":797259,"node_id":"MDQ6VXNlcjc5NzI1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/797259?v=4","gravatar_id":"","url":"https://api.github.com/users/mattdodge","html_url":"https://github.com/mattdodge","followers_url":"https://api.github.com/users/mattdodge/followers","following_url":"https://api.github.com/users/mattdodge/following{/other_user}","gists_url":"https://api.github.com/users/mattdodge/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdodge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdodge/subscriptions","organizations_url":"https://api.github.com/users/mattdodge/orgs","repos_url":"https://api.github.com/users/mattdodge/repos","events_url":"https://api.github.com/users/mattdodge/events{/privacy}","received_events_url":"https://api.github.com/users/mattdodge/received_events","type":"User","site_admin":false},"body":"Why do we raise just to print that message? Can we just print it here? I think this can also be cleaned up a bit, maybe this:\r\n```python\r\ntry:\r\n  driver_name = next((x for x in pyodbc.drivers() if x.endswith(' for SQL Server')), None)\r\n  assert driver_name\r\nexcept Exception:\r\n  print('No driver found...')\r\n```","created_at":"2018-06-26T21:58:27Z","updated_at":"2018-06-26T22:01:28Z","html_url":"https://github.com/nio-blocks/mssql/pull/17#discussion_r198310925","pull_request_url":"https://api.github.com/repos/nio-blocks/mssql/pulls/17","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/comments/198310925"},"html":{"href":"https://github.com/nio-blocks/mssql/pull/17#discussion_r198310925"},"pull_request":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/nio-blocks/mssql/pulls/17","id":197485624,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NDg1NjI0","html_url":"https://github.com/nio-blocks/mssql/pull/17","diff_url":"https://github.com/nio-blocks/mssql/pull/17.diff","patch_url":"https://github.com/nio-blocks/mssql/pull/17.patch","issue_url":"https://api.github.com/repos/nio-blocks/mssql/issues/17","number":17,"state":"open","locked":false,"title":"add db category to spec - DO NOT MERGE UNTIL DRIVER DEPENDENCY ISSUE SOLVED","user":{"login":"deliciousmonster","id":2762604,"node_id":"MDQ6VXNlcjI3NjI2MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2762604?v=4","gravatar_id":"","url":"https://api.github.com/users/deliciousmonster","html_url":"https://github.com/deliciousmonster","followers_url":"https://api.github.com/users/deliciousmonster/followers","following_url":"https://api.github.com/users/deliciousmonster/following{/other_user}","gists_url":"https://api.github.com/users/deliciousmonster/gists{/gist_id}","starred_url":"https://api.github.com/users/deliciousmonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deliciousmonster/subscriptions","organizations_url":"https://api.github.com/users/deliciousmonster/orgs","repos_url":"https://api.github.com/users/deliciousmonster/repos","events_url":"https://api.github.com/users/deliciousmonster/events{/privacy}","received_events_url":"https://api.github.com/users/deliciousmonster/received_events","type":"User","site_admin":false},"body":"Need to figure out how to handle Microsoft ODBC Driver 17 for SQL Server dependency (since it can't be installed via pip).","created_at":"2018-06-26T16:41:53Z","updated_at":"2018-06-26T22:01:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e45ba609c894903d3241bc022ae7d35a9339d967","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nio-blocks/mssql/pulls/17/commits","review_comments_url":"https://api.github.com/repos/nio-blocks/mssql/pulls/17/comments","review_comment_url":"https://api.github.com/repos/nio-blocks/mssql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nio-blocks/mssql/issues/17/comments","statuses_url":"https://api.github.com/repos/nio-blocks/mssql/statuses/ba938c07bd555a641197062e9370b339a0d87528","head":{"label":"nio-blocks:add-category","ref":"add-category","sha":"ba938c07bd555a641197062e9370b339a0d87528","user":{"login":"nio-blocks","id":7684467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2ODQ0Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/7684467?v=4","gravatar_id":"","url":"https://api.github.com/users/nio-blocks","html_url":"https://github.com/nio-blocks","followers_url":"https://api.github.com/users/nio-blocks/followers","following_url":"https://api.github.com/users/nio-blocks/following{/other_user}","gists_url":"https://api.github.com/users/nio-blocks/gists{/gist_id}","starred_url":"https://api.github.com/users/nio-blocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nio-blocks/subscriptions","organizations_url":"https://api.github.com/users/nio-blocks/orgs","repos_url":"https://api.github.com/users/nio-blocks/repos","events_url":"https://api.github.com/users/nio-blocks/events{/privacy}","received_events_url":"https://api.github.com/users/nio-blocks/received_events","type":"Organization","site_admin":false},"repo":{"id":115140799,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUxNDA3OTk=","name":"mssql","full_name":"nio-blocks/mssql","owner":{"login":"nio-blocks","id":7684467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2ODQ0Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/7684467?v=4","gravatar_id":"","url":"https://api.github.com/users/nio-blocks","html_url":"https://github.com/nio-blocks","followers_url":"https://api.github.com/users/nio-blocks/followers","following_url":"https://api.github.com/users/nio-blocks/following{/other_user}","gists_url":"https://api.github.com/users/nio-blocks/gists{/gist_id}","starred_url":"https://api.github.com/users/nio-blocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nio-blocks/subscriptions","organizations_url":"https://api.github.com/users/nio-blocks/orgs","repos_url":"https://api.github.com/users/nio-blocks/repos","events_url":"https://api.github.com/users/nio-blocks/events{/privacy}","received_events_url":"https://api.github.com/users/nio-blocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nio-blocks/mssql","description":"nio block for mssql","fork":false,"url":"https://api.github.com/repos/nio-blocks/mssql","forks_url":"https://api.github.com/repos/nio-blocks/mssql/forks","keys_url":"https://api.github.com/repos/nio-blocks/mssql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nio-blocks/mssql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nio-blocks/mssql/teams","hooks_url":"https://api.github.com/repos/nio-blocks/mssql/hooks","issue_events_url":"https://api.github.com/repos/nio-blocks/mssql/issues/events{/number}","events_url":"https://api.github.com/repos/nio-blocks/mssql/events","assignees_url":"https://api.github.com/repos/nio-blocks/mssql/assignees{/user}","branches_url":"https://api.github.com/repos/nio-blocks/mssql/branches{/branch}","tags_url":"https://api.github.com/repos/nio-blocks/mssql/tags","blobs_url":"https://api.github.com/repos/nio-blocks/mssql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nio-blocks/mssql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nio-blocks/mssql/git/refs{/sha}","trees_url":"https://api.github.com/repos/nio-blocks/mssql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nio-blocks/mssql/statuses/{sha}","languages_url":"https://api.github.com/repos/nio-blocks/mssql/languages","stargazers_url":"https://api.github.com/repos/nio-blocks/mssql/stargazers","contributors_url":"https://api.github.com/repos/nio-blocks/mssql/contributors","subscribers_url":"https://api.github.com/repos/nio-blocks/mssql/subscribers","subscription_url":"https://api.github.com/repos/nio-blocks/mssql/subscription","commits_url":"https://api.github.com/repos/nio-blocks/mssql/commits{/sha}","git_commits_url":"https://api.github.com/repos/nio-blocks/mssql/git/commits{/sha}","comments_url":"https://api.github.com/repos/nio-blocks/mssql/comments{/number}","issue_comment_url":"https://api.github.com/repos/nio-blocks/mssql/issues/comments{/number}","contents_url":"https://api.github.com/repos/nio-blocks/mssql/contents/{+path}","compare_url":"https://api.github.com/repos/nio-blocks/mssql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nio-blocks/mssql/merges","archive_url":"https://api.github.com/repos/nio-blocks/mssql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nio-blocks/mssql/downloads","issues_url":"https://api.github.com/repos/nio-blocks/mssql/issues{/number}","pulls_url":"https://api.github.com/repos/nio-blocks/mssql/pulls{/number}","milestones_url":"https://api.github.com/repos/nio-blocks/mssql/milestones{/number}","notifications_url":"https://api.github.com/repos/nio-blocks/mssql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nio-blocks/mssql/labels{/name}","releases_url":"https://api.github.com/repos/nio-blocks/mssql/releases{/id}","deployments_url":"https://api.github.com/repos/nio-blocks/mssql/deployments","created_at":"2017-12-22T18:30:21Z","updated_at":"2018-05-17T21:10:01Z","pushed_at":"2018-06-26T18:09:59Z","git_url":"git://github.com/nio-blocks/mssql.git","ssh_url":"git@github.com:nio-blocks/mssql.git","clone_url":"https://github.com/nio-blocks/mssql.git","svn_url":"https://github.com/nio-blocks/mssql","homepage":null,"size":82,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nio-blocks:master","ref":"master","sha":"0ec2591dd5047731b3c557e6d2eb1a02a6df9150","user":{"login":"nio-blocks","id":7684467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2ODQ0Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/7684467?v=4","gravatar_id":"","url":"https://api.github.com/users/nio-blocks","html_url":"https://github.com/nio-blocks","followers_url":"https://api.github.com/users/nio-blocks/followers","following_url":"https://api.github.com/users/nio-blocks/following{/other_user}","gists_url":"https://api.github.com/users/nio-blocks/gists{/gist_id}","starred_url":"https://api.github.com/users/nio-blocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nio-blocks/subscriptions","organizations_url":"https://api.github.com/users/nio-blocks/orgs","repos_url":"https://api.github.com/users/nio-blocks/repos","events_url":"https://api.github.com/users/nio-blocks/events{/privacy}","received_events_url":"https://api.github.com/users/nio-blocks/received_events","type":"Organization","site_admin":false},"repo":{"id":115140799,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUxNDA3OTk=","name":"mssql","full_name":"nio-blocks/mssql","owner":{"login":"nio-blocks","id":7684467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2ODQ0Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/7684467?v=4","gravatar_id":"","url":"https://api.github.com/users/nio-blocks","html_url":"https://github.com/nio-blocks","followers_url":"https://api.github.com/users/nio-blocks/followers","following_url":"https://api.github.com/users/nio-blocks/following{/other_user}","gists_url":"https://api.github.com/users/nio-blocks/gists{/gist_id}","starred_url":"https://api.github.com/users/nio-blocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nio-blocks/subscriptions","organizations_url":"https://api.github.com/users/nio-blocks/orgs","repos_url":"https://api.github.com/users/nio-blocks/repos","events_url":"https://api.github.com/users/nio-blocks/events{/privacy}","received_events_url":"https://api.github.com/users/nio-blocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nio-blocks/mssql","description":"nio block for mssql","fork":false,"url":"https://api.github.com/repos/nio-blocks/mssql","forks_url":"https://api.github.com/repos/nio-blocks/mssql/forks","keys_url":"https://api.github.com/repos/nio-blocks/mssql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nio-blocks/mssql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nio-blocks/mssql/teams","hooks_url":"https://api.github.com/repos/nio-blocks/mssql/hooks","issue_events_url":"https://api.github.com/repos/nio-blocks/mssql/issues/events{/number}","events_url":"https://api.github.com/repos/nio-blocks/mssql/events","assignees_url":"https://api.github.com/repos/nio-blocks/mssql/assignees{/user}","branches_url":"https://api.github.com/repos/nio-blocks/mssql/branches{/branch}","tags_url":"https://api.github.com/repos/nio-blocks/mssql/tags","blobs_url":"https://api.github.com/repos/nio-blocks/mssql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nio-blocks/mssql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nio-blocks/mssql/git/refs{/sha}","trees_url":"https://api.github.com/repos/nio-blocks/mssql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nio-blocks/mssql/statuses/{sha}","languages_url":"https://api.github.com/repos/nio-blocks/mssql/languages","stargazers_url":"https://api.github.com/repos/nio-blocks/mssql/stargazers","contributors_url":"https://api.github.com/repos/nio-blocks/mssql/contributors","subscribers_url":"https://api.github.com/repos/nio-blocks/mssql/subscribers","subscription_url":"https://api.github.com/repos/nio-blocks/mssql/subscription","commits_url":"https://api.github.com/repos/nio-blocks/mssql/commits{/sha}","git_commits_url":"https://api.github.com/repos/nio-blocks/mssql/git/commits{/sha}","comments_url":"https://api.github.com/repos/nio-blocks/mssql/comments{/number}","issue_comment_url":"https://api.github.com/repos/nio-blocks/mssql/issues/comments{/number}","contents_url":"https://api.github.com/repos/nio-blocks/mssql/contents/{+path}","compare_url":"https://api.github.com/repos/nio-blocks/mssql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nio-blocks/mssql/merges","archive_url":"https://api.github.com/repos/nio-blocks/mssql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nio-blocks/mssql/downloads","issues_url":"https://api.github.com/repos/nio-blocks/mssql/issues{/number}","pulls_url":"https://api.github.com/repos/nio-blocks/mssql/pulls{/number}","milestones_url":"https://api.github.com/repos/nio-blocks/mssql/milestones{/number}","notifications_url":"https://api.github.com/repos/nio-blocks/mssql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nio-blocks/mssql/labels{/name}","releases_url":"https://api.github.com/repos/nio-blocks/mssql/releases{/id}","deployments_url":"https://api.github.com/repos/nio-blocks/mssql/deployments","created_at":"2017-12-22T18:30:21Z","updated_at":"2018-05-17T21:10:01Z","pushed_at":"2018-06-26T18:09:59Z","git_url":"git://github.com/nio-blocks/mssql.git","ssh_url":"git@github.com:nio-blocks/mssql.git","clone_url":"https://github.com/nio-blocks/mssql.git","svn_url":"https://github.com/nio-blocks/mssql","homepage":null,"size":82,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/17"},"html":{"href":"https://github.com/nio-blocks/mssql/pull/17"},"issue":{"href":"https://api.github.com/repos/nio-blocks/mssql/issues/17"},"comments":{"href":"https://api.github.com/repos/nio-blocks/mssql/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nio-blocks/mssql/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/nio-blocks/mssql/statuses/ba938c07bd555a641197062e9370b339a0d87528"}},"author_association":"NONE"}}
{"actor":{"display_login":"mattdodge"}}