diff --git a/readthedocs/api/v2/views/model_views.py b/readthedocs/api/v2/views/model_views.py index b0ee7dff1cf..086e73ce139 100644 --- a/readthedocs/api/v2/views/model_views.py +++ b/readthedocs/api/v2/views/model_views.py @@ -95,7 +95,7 @@ class DisableListEndpoint: We are disablng the listing endpoint because it could cause DOS without using any type of filtering. - This class disables these endpoints except: + This class disables these endpoints except Exception: - version resource when passing ``?project__slug=`` - build resource when using ``?commit=`` diff --git a/readthedocs/proxito/tests/test_hosting.py b/readthedocs/proxito/tests/test_hosting.py index cc691b1c036..b89b761796b 100644 --- a/readthedocs/proxito/tests/test_hosting.py +++ b/readthedocs/proxito/tests/test_hosting.py @@ -94,13 +94,13 @@ def _normalize_datetime_fields(self, obj): try: obj["projects"]["current"]["created"] = "2019-04-29T10:00:00Z" obj["projects"]["current"]["modified"] = "2019-04-29T12:00:00Z" - except: + except Exception: pass try: obj["builds"]["current"]["created"] = "2019-04-29T10:00:00Z" obj["builds"]["current"]["finished"] = "2019-04-29T10:01:00Z" - except: + except Exception: pass return obj diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index ffd54a61b92..561f48f0308 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -147,7 +147,7 @@ def get_remote_fetch_refspec(self): def clone(self): """Clones the repository.""" - # TODO: We should add "--no-checkout" in all git clone operations, except: + # TODO: We should add "--no-checkout" in all git clone operations, except Exception: # There exists a case of version_type=BRANCH without a branch name. # This case is relevant for building projects for the first time without knowing the name # of the default branch. Once this case has been made redundant, we can have