Raise specific exception if migration in progress

This commit is contained in:
AlanCoding 2019-11-25 15:29:05 -05:00
parent bdd63f36a8
commit 1a85874964
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B
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