Merge "Fix wrong import from six.moves to make openstackwatch workable"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 01ee443..1752100 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,5 +8,5 @@
Pull requests submitted through GitHub will be ignored.
-Bugs should be filed [on Launchpad](https://bugs.launchpad.net/openstack-ci),
+Bugs should be filed [on StoryBoard](https://storyboard.openstack.org/#!/project/722),
not in GitHub's issue tracker.
diff --git a/README.rst b/README.rst
index ef52cf5..3890b1e 100644
--- a/README.rst
+++ b/README.rst
@@ -4,4 +4,4 @@
jeepyb is a collection of tools which make managing a gerrit easier.
Specifically, management of gerrit projects and their associated upstream
-integration with things like github and launchpad.
+integration with things like github, launchpad, and storyboard.
diff --git a/jeepyb/cmd/manage_projects.py b/jeepyb/cmd/manage_projects.py
index ff5b4c7..6ad970e 100644
--- a/jeepyb/cmd/manage_projects.py
+++ b/jeepyb/cmd/manage_projects.py
@@ -395,6 +395,10 @@
def update_local_copy(repo_path, track_upstream, git_opts, ssh_env):
+ # first do a clean of the branch to prevent possible
+ # problems due to previous runs
+ git_command(repo_path, "clean -fdx")
+
has_upstream_remote = (
'upstream' in git_command_output(repo_path, 'remote')[1])
if track_upstream:
diff --git a/jeepyb/gerritdb.py b/jeepyb/gerritdb.py
index 8343b8e..767991f 100644
--- a/jeepyb/gerritdb.py
+++ b/jeepyb/gerritdb.py
@@ -60,4 +60,11 @@
import psycopg2
db_connection = psycopg2.connect(
host=DB_HOST, user=DB_USER, password=DB_PASS, database=DB_DB)
+ else:
+ try:
+ # Make sure the database is responding and reconnect if not
+ db_connection.ping(True)
+ except AttributeError:
+ # This database driver lacks a ping implementation
+ pass
return db_connection