{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/comments/45628131","id":45628131,"diff_hunk":"@@ -191,16 +191,23 @@ def setup_server(db, odoo_unittest, tested_addons, server_path,\n     if preinstall_modules is None:\n         preinstall_modules = ['base']\n     print(\"\\nCreating instance:\")\n-    subprocess.check_call([\"createdb\", db])\n-    cmd_odoo = [\"%s/openerp-server\" % server_path,\n-                \"-d\", db,\n-                \"--log-level=warn\",\n-                \"--stop-after-init\",\n-                \"--addons-path\", addons_path,\n-                \"--init\", ','.join(preinstall_modules),\n-                ] + install_options\n-    print(\" \".join(cmd_odoo))\n-    subprocess.check_call(cmd_odoo)\n+    db_tmpl_created = False\n+    try:\n+        subprocess.check_call([\"createdb\", db])\n+    except subprocess.CalledProcessError:\n+        db_tmpl_created = True\n+    if not db_tmpl_created:\n+        cmd_odoo = [\"%s/openerp-server\" % server_path,\n+                    \"-d\", db,\n+                    \"--log-level=warn\",\n+                    \"--stop-after-init\",\n+                    \"--addons-path\", addons_path,\n+                    \"--init\", ','.join(preinstall_modules),\n+                    ] + install_options\n+        print(\" \".join(cmd_odoo))\n+        subprocess.check_call(cmd_odoo)\n+    else:\n+        print(\"Using previous openerp_template database.\")","path":"travis/test_server.py","position":30,"original_position":30,"commit_id":"4b208d6ecaf2cabafa66ef16e19206310a304e1f","original_commit_id":"4b208d6ecaf2cabafa66ef16e19206310a304e1f","user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"body":"good catch!\r\nThank you\r\nI will change it","created_at":"2015-11-23T16:54:08Z","updated_at":"2015-11-23T16:54:08Z","html_url":"https://github.com/OCA/maintainer-quality-tools/pull/297#discussion_r45628131","pull_request_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297","_links":{"self":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/comments/45628131"},"html":{"href":"https://github.com/OCA/maintainer-quality-tools/pull/297#discussion_r45628131"},"pull_request":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297","id":51449759,"html_url":"https://github.com/OCA/maintainer-quality-tools/pull/297","diff_url":"https://github.com/OCA/maintainer-quality-tools/pull/297.diff","patch_url":"https://github.com/OCA/maintainer-quality-tools/pull/297.patch","issue_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/297","number":297,"state":"open","locked":false,"title":"[IMP] test_server: Enable store database (avoid delete it)","user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"body":" - Useful in next runbot-docker https://github.com/OCA/runbot-addons/pull/71\r\n  - This code is completely tested in  module here: https://github.com/OCA/runbot-addons/pull/71\r\n - Useful to use travis2docker locally with OCA repositories\r\n - [REF] .travis.yml: Using cp instead mv to avoid docker/docker#4570\r\n","created_at":"2015-11-21T20:40:15Z","updated_at":"2015-11-23T16:54:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8647aa834585ae470334cfec2c28d84d3552612b","assignee":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297/commits","review_comments_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297/comments","review_comment_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/297/comments","statuses_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/statuses/4b208d6ecaf2cabafa66ef16e19206310a304e1f","head":{"label":"vauxoo-dev:master-oca-t2d-compatibility","ref":"master-oca-t2d-compatibility","sha":"4b208d6ecaf2cabafa66ef16e19206310a304e1f","user":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":23239720,"name":"maintainer-quality-tools","full_name":"vauxoo-dev/maintainer-quality-tools","owner":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vauxoo-dev/maintainer-quality-tools","description":"QA tools for Odoo maintainers","fork":true,"url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools","forks_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/forks","keys_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/teams","hooks_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/hooks","issue_events_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/issues/events{/number}","events_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/events","assignees_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/assignees{/user}","branches_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/branches{/branch}","tags_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/tags","blobs_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/languages","stargazers_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/stargazers","contributors_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/contributors","subscribers_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/subscribers","subscription_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/subscription","commits_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/contents/{+path}","compare_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/merges","archive_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/downloads","issues_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/issues{/number}","pulls_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/labels{/name}","releases_url":"https://api.github.com/repos/vauxoo-dev/maintainer-quality-tools/releases{/id}","created_at":"2014-08-22T21:00:30Z","updated_at":"2014-12-07T20:54:27Z","pushed_at":"2015-11-23T12:42:12Z","git_url":"git://github.com/vauxoo-dev/maintainer-quality-tools.git","ssh_url":"git@github.com:vauxoo-dev/maintainer-quality-tools.git","clone_url":"https://github.com/vauxoo-dev/maintainer-quality-tools.git","svn_url":"https://github.com/vauxoo-dev/maintainer-quality-tools","homepage":null,"size":671,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master-add_pylint_config-vauxoo"}},"base":{"label":"OCA:master","ref":"master","sha":"bb79045675ee1e8f08edfdd021f83c2e85a34401","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":21388550,"name":"maintainer-quality-tools","full_name":"OCA/maintainer-quality-tools","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/maintainer-quality-tools","description":"QA tools for Odoo maintainers","fork":false,"url":"https://api.github.com/repos/OCA/maintainer-quality-tools","forks_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/forks","keys_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/teams","hooks_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/hooks","issue_events_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/events","assignees_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/tags","blobs_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/languages","stargazers_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/stargazers","contributors_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/contributors","subscribers_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/subscribers","subscription_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/subscription","commits_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/merges","archive_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/downloads","issues_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/labels{/name}","releases_url":"https://api.github.com/repos/OCA/maintainer-quality-tools/releases{/id}","created_at":"2014-07-01T13:26:17Z","updated_at":"2015-11-05T16:24:21Z","pushed_at":"2015-11-23T12:42:12Z","git_url":"git://github.com/OCA/maintainer-quality-tools.git","ssh_url":"git@github.com:OCA/maintainer-quality-tools.git","clone_url":"https://github.com/OCA/maintainer-quality-tools.git","svn_url":"https://github.com/OCA/maintainer-quality-tools","homepage":null,"size":473,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":29,"forks":54,"open_issues":29,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297"},"html":{"href":"https://github.com/OCA/maintainer-quality-tools/pull/297"},"issue":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/297"},"comments":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/issues/297/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/pulls/297/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/maintainer-quality-tools/statuses/4b208d6ecaf2cabafa66ef16e19206310a304e1f"}}}}