{"action":"created","comment":{"url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/comments/174298785","pull_request_review_id":103629931,"id":174298785,"diff_hunk":"@@ -0,0 +1,290 @@\n+import sqlite3\n+import tempfile\n+import os\n+import urllib.request\n+\n+'''\n+    This class manages local cache\n+'''\n+\n+class CacheManager():\n+    def __init__(self):\n+        self.tempDir = tempfile.gettempdir()\n+        self.dbName = \"amigocloud_local_db.db\"\n+        self.tempPath = os.path.join(self.tempDir, self.dbName)\n+        self.isDev = False\n+\n+    def devPrint(self,content):\n+        if self.isDev == True:\n+            print(content)\n+\n+    def openConn(self):\n+        conn = sqlite3.connect(self.tempPath)","path":"CacheManager.py","position":22,"original_position":22,"commit_id":"0ca8a8df83affb30d48afda7b52b089aafbe6401","original_commit_id":"0ca8a8df83affb30d48afda7b52b089aafbe6401","user":{"login":"vchernetsky","id":1840126,"avatar_url":"https://avatars0.githubusercontent.com/u/1840126?v=4","gravatar_id":"","url":"https://api.github.com/users/vchernetsky","html_url":"https://github.com/vchernetsky","followers_url":"https://api.github.com/users/vchernetsky/followers","following_url":"https://api.github.com/users/vchernetsky/following{/other_user}","gists_url":"https://api.github.com/users/vchernetsky/gists{/gist_id}","starred_url":"https://api.github.com/users/vchernetsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vchernetsky/subscriptions","organizations_url":"https://api.github.com/users/vchernetsky/orgs","repos_url":"https://api.github.com/users/vchernetsky/repos","events_url":"https://api.github.com/users/vchernetsky/events{/privacy}","received_events_url":"https://api.github.com/users/vchernetsky/received_events","type":"User","site_admin":false},"body":"Perhaps conn should be a member of a CacheManager  class. It would be easier to handle the connection, and close it when appropriate. Because not it doesn't get closed at all.","created_at":"2018-03-13T22:00:55Z","updated_at":"2018-03-13T22:00:55Z","html_url":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19#discussion_r174298785","pull_request_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/comments/174298785"},"html":{"href":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19#discussion_r174298785"},"pull_request":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19","id":174742853,"html_url":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19","diff_url":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19.diff","patch_url":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19.patch","issue_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/19","number":19,"state":"open","locked":false,"title":"Added support for picklists.","user":{"login":"arturocuya","id":29876959,"avatar_url":"https://avatars1.githubusercontent.com/u/29876959?v=4","gravatar_id":"","url":"https://api.github.com/users/arturocuya","html_url":"https://github.com/arturocuya","followers_url":"https://api.github.com/users/arturocuya/followers","following_url":"https://api.github.com/users/arturocuya/following{/other_user}","gists_url":"https://api.github.com/users/arturocuya/gists{/gist_id}","starred_url":"https://api.github.com/users/arturocuya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturocuya/subscriptions","organizations_url":"https://api.github.com/users/arturocuya/orgs","repos_url":"https://api.github.com/users/arturocuya/repos","events_url":"https://api.github.com/users/arturocuya/events{/privacy}","received_events_url":"https://api.github.com/users/arturocuya/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-13T17:59:22Z","updated_at":"2018-03-13T22:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15fe20a219527257820f27876e60492b4578509b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19/commits","review_comments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19/comments","review_comment_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/19/comments","statuses_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/statuses/0ca8a8df83affb30d48afda7b52b089aafbe6401","head":{"label":"amigocloud:plugin_update","ref":"plugin_update","sha":"0ca8a8df83affb30d48afda7b52b089aafbe6401","user":{"login":"amigocloud","id":2791728,"avatar_url":"https://avatars2.githubusercontent.com/u/2791728?v=4","gravatar_id":"","url":"https://api.github.com/users/amigocloud","html_url":"https://github.com/amigocloud","followers_url":"https://api.github.com/users/amigocloud/followers","following_url":"https://api.github.com/users/amigocloud/following{/other_user}","gists_url":"https://api.github.com/users/amigocloud/gists{/gist_id}","starred_url":"https://api.github.com/users/amigocloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amigocloud/subscriptions","organizations_url":"https://api.github.com/users/amigocloud/orgs","repos_url":"https://api.github.com/users/amigocloud/repos","events_url":"https://api.github.com/users/amigocloud/events{/privacy}","received_events_url":"https://api.github.com/users/amigocloud/received_events","type":"Organization","site_admin":false},"repo":{"id":43329300,"name":"qgis-amigocloud-plugin","full_name":"amigocloud/qgis-amigocloud-plugin","owner":{"login":"amigocloud","id":2791728,"avatar_url":"https://avatars2.githubusercontent.com/u/2791728?v=4","gravatar_id":"","url":"https://api.github.com/users/amigocloud","html_url":"https://github.com/amigocloud","followers_url":"https://api.github.com/users/amigocloud/followers","following_url":"https://api.github.com/users/amigocloud/following{/other_user}","gists_url":"https://api.github.com/users/amigocloud/gists{/gist_id}","starred_url":"https://api.github.com/users/amigocloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amigocloud/subscriptions","organizations_url":"https://api.github.com/users/amigocloud/orgs","repos_url":"https://api.github.com/users/amigocloud/repos","events_url":"https://api.github.com/users/amigocloud/events{/privacy}","received_events_url":"https://api.github.com/users/amigocloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amigocloud/qgis-amigocloud-plugin","description":"Python plugin for QGIS enabling AmigoCloud GDAL data source","fork":false,"url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin","forks_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/forks","keys_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/teams","hooks_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/hooks","issue_events_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/events","assignees_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/tags","blobs_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/languages","stargazers_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/stargazers","contributors_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/contributors","subscribers_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/subscribers","subscription_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/subscription","commits_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/merges","archive_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/downloads","issues_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/labels{/name}","releases_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/deployments","created_at":"2015-09-28T21:58:57Z","updated_at":"2017-06-20T14:40:53Z","pushed_at":"2018-03-13T18:17:51Z","git_url":"git://github.com/amigocloud/qgis-amigocloud-plugin.git","ssh_url":"git@github.com:amigocloud/qgis-amigocloud-plugin.git","clone_url":"https://github.com/amigocloud/qgis-amigocloud-plugin.git","svn_url":"https://github.com/amigocloud/qgis-amigocloud-plugin","homepage":null,"size":83,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"amigocloud:master","ref":"master","sha":"915dd23d85230103e5ba23de389fa3f515043bdf","user":{"login":"amigocloud","id":2791728,"avatar_url":"https://avatars2.githubusercontent.com/u/2791728?v=4","gravatar_id":"","url":"https://api.github.com/users/amigocloud","html_url":"https://github.com/amigocloud","followers_url":"https://api.github.com/users/amigocloud/followers","following_url":"https://api.github.com/users/amigocloud/following{/other_user}","gists_url":"https://api.github.com/users/amigocloud/gists{/gist_id}","starred_url":"https://api.github.com/users/amigocloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amigocloud/subscriptions","organizations_url":"https://api.github.com/users/amigocloud/orgs","repos_url":"https://api.github.com/users/amigocloud/repos","events_url":"https://api.github.com/users/amigocloud/events{/privacy}","received_events_url":"https://api.github.com/users/amigocloud/received_events","type":"Organization","site_admin":false},"repo":{"id":43329300,"name":"qgis-amigocloud-plugin","full_name":"amigocloud/qgis-amigocloud-plugin","owner":{"login":"amigocloud","id":2791728,"avatar_url":"https://avatars2.githubusercontent.com/u/2791728?v=4","gravatar_id":"","url":"https://api.github.com/users/amigocloud","html_url":"https://github.com/amigocloud","followers_url":"https://api.github.com/users/amigocloud/followers","following_url":"https://api.github.com/users/amigocloud/following{/other_user}","gists_url":"https://api.github.com/users/amigocloud/gists{/gist_id}","starred_url":"https://api.github.com/users/amigocloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amigocloud/subscriptions","organizations_url":"https://api.github.com/users/amigocloud/orgs","repos_url":"https://api.github.com/users/amigocloud/repos","events_url":"https://api.github.com/users/amigocloud/events{/privacy}","received_events_url":"https://api.github.com/users/amigocloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amigocloud/qgis-amigocloud-plugin","description":"Python plugin for QGIS enabling AmigoCloud GDAL data source","fork":false,"url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin","forks_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/forks","keys_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/teams","hooks_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/hooks","issue_events_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/events","assignees_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/tags","blobs_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/languages","stargazers_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/stargazers","contributors_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/contributors","subscribers_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/subscribers","subscription_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/subscription","commits_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/merges","archive_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/downloads","issues_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/labels{/name}","releases_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/deployments","created_at":"2015-09-28T21:58:57Z","updated_at":"2017-06-20T14:40:53Z","pushed_at":"2018-03-13T18:17:51Z","git_url":"git://github.com/amigocloud/qgis-amigocloud-plugin.git","ssh_url":"git@github.com:amigocloud/qgis-amigocloud-plugin.git","clone_url":"https://github.com/amigocloud/qgis-amigocloud-plugin.git","svn_url":"https://github.com/amigocloud/qgis-amigocloud-plugin","homepage":null,"size":83,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19"},"html":{"href":"https://github.com/amigocloud/qgis-amigocloud-plugin/pull/19"},"issue":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/19"},"comments":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/amigocloud/qgis-amigocloud-plugin/statuses/0ca8a8df83affb30d48afda7b52b089aafbe6401"}},"author_association":"NONE"}}
{"actor":{"display_login":"vchernetsky"}}