Merge pull request #5395 from AlanCoding/you_are_migrating

Raise specific exception if migration in progress

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-11-26 03:40:43 +00:00 committed by GitHub
commit c87c0aa712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -184,6 +184,8 @@ class Page(object):
a __class__ instance if the request path is different than the caller's `endpoint`.
"""
request_path = response.request.path_url
if request_path == '/migrations_notran/':
raise exc.IsMigrating('You have been redirected to the migration-in-progress page.')
request_method = response.request.method.lower()
self.last_elapsed = response.elapsed

View File

@ -96,3 +96,8 @@ class WaitUntilTimeout(Common):
class UnexpectedAWXState(Common):
pass
class IsMigrating(Common):
pass