diff --git a/musicbrainzngs/musicbrainz.py b/musicbrainzngs/musicbrainz.py index 2ac5ce9..b46ecdc 100644 --- a/musicbrainzngs/musicbrainz.py +++ b/musicbrainzngs/musicbrainz.py @@ -22,6 +22,7 @@ _version = "0.7dev" _log = logging.getLogger("musicbrainzngs") +_max_retries = 8 LUCENE_SPECIAL = r'([+\-&|!(){}\[\]\^"~*?:\\\/])' @@ -461,7 +462,7 @@ def get_method(self): # Core (internal) functions for calling the MB API. -def _safe_read(opener, req, body=None, max_retries=8, retry_delay_delta=2.0): +def _safe_read(opener, req, body=None, max_retries=_max_retries, retry_delay_delta=2.0): """Open an HTTP request with a given URL opener and (optionally) a request body. Transient errors lead to retries. Permanent errors and repeated errors are translated into a small set of handleable