###############################################################################
# #
# ddns - A dynamic DNS client for IPFire #
-# Copyright (C) 2012 IPFire development team #
+# Copyright (C) 2012-2017 IPFire development team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
reason = N_("Service unavailable")
+class DDNSTooManyRequests(DDNSError):
+ """
+ Raised when too many requests occured.
+ """
+ reason = N_("Too many requests")
+
+
class DDNSUpdateError(DDNSError):
"""
Thrown when an update could not be
elif e.code == 404:
raise DDNSNotFound(e.reason)
+ # 429 - Too Many Requests
+ elif e.code == 429:
+ raise DDNSTooManyRequests(e.reason)
+
# 500 - Internal Server Error
elif e.code == 500:
raise DDNSInternalServerError(e.reason)