{"action":"created","comment":{"url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/comments/28842804","id":28842804,"diff_hunk":"@@ -198,26 +198,19 @@ def tearDown_test_db():\n     \"\"\"Deletes the test db\n         although this seams not to work on my system it leaves me with an zero kb file\n     \"\"\"\n-    # uncomment next line so leave the db intact between test and at the end\n-    # return False\n \n-    try:\n-        if os.path.exists(os.path.join(TESTDIR, TESTDBNAME)):\n-            os.remove(os.path.join(TESTDIR, TESTDBNAME))\n-    except:\n-        pass\n+    #uncomment next line so leave the db intact between test and at the end\n+    #return False\n \n-    try:\n-        if os.path.exists(os.path.join(TESTDIR, TESTCACHEDBNAME)):\n-            os.remove(os.path.join(TESTDIR, TESTCACHEDBNAME))\n-    except:\n-        pass\n+    for current_db in [ TESTDBNAME, TESTCACHEDBNAME, TESTFAILEDDBNAME ]:\n+        for file_name in [ os.path.join(TESTDIR, current_db), os.path.join(TESTDIR, current_db + '-journal') ]:\n+            if os.path.exists(file_name):\n+                try:\n+                    os.remove(file_name)\n+                except IOError, e:","path":"tests/test_lib.py","position":34,"original_position":34,"commit_id":"04626245dd4cdba3e700e627be46ed2b885c84fe","original_commit_id":"04626245dd4cdba3e700e627be46ed2b885c84fe","user":{"login":"abeloin","id":6260303,"avatar_url":"https://avatars.githubusercontent.com/u/6260303?v=3","gravatar_id":"","url":"https://api.github.com/users/abeloin","html_url":"https://github.com/abeloin","followers_url":"https://api.github.com/users/abeloin/followers","following_url":"https://api.github.com/users/abeloin/following{/other_user}","gists_url":"https://api.github.com/users/abeloin/gists{/gist_id}","starred_url":"https://api.github.com/users/abeloin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeloin/subscriptions","organizations_url":"https://api.github.com/users/abeloin/orgs","repos_url":"https://api.github.com/users/abeloin/repos","events_url":"https://api.github.com/users/abeloin/events{/privacy}","received_events_url":"https://api.github.com/users/abeloin/received_events","type":"User","site_admin":false},"body":"This should check for IOError and OSError and be in the new format( except (IOError, OSError) as e)","created_at":"2015-04-22T03:54:50Z","updated_at":"2015-04-22T03:54:50Z","html_url":"https://github.com/SiCKRAGETV/SickRage/pull/1812#discussion_r28842804","pull_request_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812","_links":{"self":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/comments/28842804"},"html":{"href":"https://github.com/SiCKRAGETV/SickRage/pull/1812#discussion_r28842804"},"pull_request":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812"}}},"pull_request":{"url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812","id":33801805,"html_url":"https://github.com/SiCKRAGETV/SickRage/pull/1812","diff_url":"https://github.com/SiCKRAGETV/SickRage/pull/1812.diff","patch_url":"https://github.com/SiCKRAGETV/SickRage/pull/1812.patch","issue_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/1812","number":1812,"state":"open","locked":false,"title":"Build tests","user":{"login":"miigotu","id":390379,"avatar_url":"https://avatars.githubusercontent.com/u/390379?v=3","gravatar_id":"","url":"https://api.github.com/users/miigotu","html_url":"https://github.com/miigotu","followers_url":"https://api.github.com/users/miigotu/followers","following_url":"https://api.github.com/users/miigotu/following{/other_user}","gists_url":"https://api.github.com/users/miigotu/gists{/gist_id}","starred_url":"https://api.github.com/users/miigotu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miigotu/subscriptions","organizations_url":"https://api.github.com/users/miigotu/orgs","repos_url":"https://api.github.com/users/miigotu/repos","events_url":"https://api.github.com/users/miigotu/events{/privacy}","received_events_url":"https://api.github.com/users/miigotu/received_events","type":"User","site_admin":false},"body":"I think its not wise to make the build tests operate on the db differently than normal operation.  It fixes the build but down the road there may be a divergence between test and run where tests succeed and run has problems.\r\n\r\nThis uses exclusive locking on the db, which is fine because we only ever have one connection to any given db at one time, and we do not want other applications touching it while we have it open anyways.  It also gives a small performance gain overall.","created_at":"2015-04-21T20:50:09Z","updated_at":"2015-04-22T03:54:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47b3df9cdde3be28e37792c78fe7959eb770ec6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812/commits","review_comments_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812/comments","review_comment_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/1812/comments","statuses_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/statuses/04626245dd4cdba3e700e627be46ed2b885c84fe","head":{"label":"miigotu:build_tests","ref":"build_tests","sha":"04626245dd4cdba3e700e627be46ed2b885c84fe","user":{"login":"miigotu","id":390379,"avatar_url":"https://avatars.githubusercontent.com/u/390379?v=3","gravatar_id":"","url":"https://api.github.com/users/miigotu","html_url":"https://github.com/miigotu","followers_url":"https://api.github.com/users/miigotu/followers","following_url":"https://api.github.com/users/miigotu/following{/other_user}","gists_url":"https://api.github.com/users/miigotu/gists{/gist_id}","starred_url":"https://api.github.com/users/miigotu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miigotu/subscriptions","organizations_url":"https://api.github.com/users/miigotu/orgs","repos_url":"https://api.github.com/users/miigotu/repos","events_url":"https://api.github.com/users/miigotu/events{/privacy}","received_events_url":"https://api.github.com/users/miigotu/received_events","type":"User","site_admin":false},"repo":{"id":27019792,"name":"SickRage","full_name":"miigotu/SickRage","owner":{"login":"miigotu","id":390379,"avatar_url":"https://avatars.githubusercontent.com/u/390379?v=3","gravatar_id":"","url":"https://api.github.com/users/miigotu","html_url":"https://github.com/miigotu","followers_url":"https://api.github.com/users/miigotu/followers","following_url":"https://api.github.com/users/miigotu/following{/other_user}","gists_url":"https://api.github.com/users/miigotu/gists{/gist_id}","starred_url":"https://api.github.com/users/miigotu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miigotu/subscriptions","organizations_url":"https://api.github.com/users/miigotu/orgs","repos_url":"https://api.github.com/users/miigotu/repos","events_url":"https://api.github.com/users/miigotu/events{/privacy}","received_events_url":"https://api.github.com/users/miigotu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miigotu/SickRage","description":"SickRage - Searches TheTVDB and TVRage for shows","fork":true,"url":"https://api.github.com/repos/miigotu/SickRage","forks_url":"https://api.github.com/repos/miigotu/SickRage/forks","keys_url":"https://api.github.com/repos/miigotu/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miigotu/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miigotu/SickRage/teams","hooks_url":"https://api.github.com/repos/miigotu/SickRage/hooks","issue_events_url":"https://api.github.com/repos/miigotu/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/miigotu/SickRage/events","assignees_url":"https://api.github.com/repos/miigotu/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/miigotu/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/miigotu/SickRage/tags","blobs_url":"https://api.github.com/repos/miigotu/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miigotu/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miigotu/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/miigotu/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miigotu/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/miigotu/SickRage/languages","stargazers_url":"https://api.github.com/repos/miigotu/SickRage/stargazers","contributors_url":"https://api.github.com/repos/miigotu/SickRage/contributors","subscribers_url":"https://api.github.com/repos/miigotu/SickRage/subscribers","subscription_url":"https://api.github.com/repos/miigotu/SickRage/subscription","commits_url":"https://api.github.com/repos/miigotu/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/miigotu/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/miigotu/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/miigotu/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/miigotu/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/miigotu/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miigotu/SickRage/merges","archive_url":"https://api.github.com/repos/miigotu/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miigotu/SickRage/downloads","issues_url":"https://api.github.com/repos/miigotu/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/miigotu/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/miigotu/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/miigotu/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miigotu/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/miigotu/SickRage/releases{/id}","created_at":"2014-11-23T02:34:42Z","updated_at":"2015-04-21T20:11:15Z","pushed_at":"2015-04-22T03:41:03Z","git_url":"git://github.com/miigotu/SickRage.git","ssh_url":"git@github.com:miigotu/SickRage.git","clone_url":"https://github.com/miigotu/SickRage.git","svn_url":"https://github.com/miigotu/SickRage","homepage":"http://www.sickrage.tv/","size":30604,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"SiCKRAGETV:develop","ref":"develop","sha":"2a0c39525e0baca0d7a491d9c78979cd2713a504","user":{"login":"SiCKRAGETV","id":9251163,"avatar_url":"https://avatars.githubusercontent.com/u/9251163?v=3","gravatar_id":"","url":"https://api.github.com/users/SiCKRAGETV","html_url":"https://github.com/SiCKRAGETV","followers_url":"https://api.github.com/users/SiCKRAGETV/followers","following_url":"https://api.github.com/users/SiCKRAGETV/following{/other_user}","gists_url":"https://api.github.com/users/SiCKRAGETV/gists{/gist_id}","starred_url":"https://api.github.com/users/SiCKRAGETV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiCKRAGETV/subscriptions","organizations_url":"https://api.github.com/users/SiCKRAGETV/orgs","repos_url":"https://api.github.com/users/SiCKRAGETV/repos","events_url":"https://api.github.com/users/SiCKRAGETV/events{/privacy}","received_events_url":"https://api.github.com/users/SiCKRAGETV/received_events","type":"Organization","site_admin":false},"repo":{"id":17582613,"name":"SickRage","full_name":"SiCKRAGETV/SickRage","owner":{"login":"SiCKRAGETV","id":9251163,"avatar_url":"https://avatars.githubusercontent.com/u/9251163?v=3","gravatar_id":"","url":"https://api.github.com/users/SiCKRAGETV","html_url":"https://github.com/SiCKRAGETV","followers_url":"https://api.github.com/users/SiCKRAGETV/followers","following_url":"https://api.github.com/users/SiCKRAGETV/following{/other_user}","gists_url":"https://api.github.com/users/SiCKRAGETV/gists{/gist_id}","starred_url":"https://api.github.com/users/SiCKRAGETV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiCKRAGETV/subscriptions","organizations_url":"https://api.github.com/users/SiCKRAGETV/orgs","repos_url":"https://api.github.com/users/SiCKRAGETV/repos","events_url":"https://api.github.com/users/SiCKRAGETV/events{/privacy}","received_events_url":"https://api.github.com/users/SiCKRAGETV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SiCKRAGETV/SickRage","description":"SickRage - Searches TheTVDB and TVRage for shows","fork":false,"url":"https://api.github.com/repos/SiCKRAGETV/SickRage","forks_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/forks","keys_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/teams","hooks_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/hooks","issue_events_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/events","assignees_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/tags","blobs_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/languages","stargazers_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/stargazers","contributors_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/contributors","subscribers_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/subscribers","subscription_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/subscription","commits_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/merges","archive_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/downloads","issues_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/SiCKRAGETV/SickRage/releases{/id}","created_at":"2014-03-10T05:20:31Z","updated_at":"2015-04-22T00:07:28Z","pushed_at":"2015-04-22T03:40:25Z","git_url":"git://github.com/SiCKRAGETV/SickRage.git","ssh_url":"git@github.com:SiCKRAGETV/SickRage.git","clone_url":"https://github.com/SiCKRAGETV/SickRage.git","svn_url":"https://github.com/SiCKRAGETV/SickRage","homepage":"http://www.sickrage.tv/","size":60341,"stargazers_count":900,"watchers_count":900,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":554,"mirror_url":null,"open_issues_count":13,"forks":554,"open_issues":13,"watchers":900,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812"},"html":{"href":"https://github.com/SiCKRAGETV/SickRage/pull/1812"},"issue":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/1812"},"comments":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/issues/1812/comments"},"review_comments":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812/comments"},"review_comment":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/pulls/1812/commits"},"statuses":{"href":"https://api.github.com/repos/SiCKRAGETV/SickRage/statuses/04626245dd4cdba3e700e627be46ed2b885c84fe"}}}}