mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
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:
@@ -184,6 +184,8 @@ class Page(object):
|
|||||||
a __class__ instance if the request path is different than the caller's `endpoint`.
|
a __class__ instance if the request path is different than the caller's `endpoint`.
|
||||||
"""
|
"""
|
||||||
request_path = response.request.path_url
|
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()
|
request_method = response.request.method.lower()
|
||||||
|
|
||||||
self.last_elapsed = response.elapsed
|
self.last_elapsed = response.elapsed
|
||||||
|
|||||||
@@ -96,3 +96,8 @@ class WaitUntilTimeout(Common):
|
|||||||
class UnexpectedAWXState(Common):
|
class UnexpectedAWXState(Common):
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class IsMigrating(Common):
|
||||||
|
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user