srijan-deepsource / readthedocs.org

Errors detected in .deepsource.toml.

Exception caught is very general PYL-W0703
Anti-pattern
Major
4 years ago4 years old
Catching too general exception Exception
 37            version.slug,
 38        )
 39        doc_obj.update(queryset.iterator())
 40    except Exception: 41        log.exception('Unable to index a subset of files. Continuing.')
 42
 43
Catching too general exception Exception
 76        if build_id:
 77            documents = documents.exclude('term', build=build_id)
 78        documents.delete()
 79    except Exception: 80        log.exception('Unable to delete a subset of files. Continuing.')
 81
 82
Catching too general exception Exception
 68    try:
 69        # This is a common case that we should be handling a better way
 70        doc_obj.update(queryset.iterator(), action='delete')
 71    except Exception: 72        log.warning('Unable to delete a subset of files. Continuing.', exc_info=True)
 73
 74
Catching too general exception Exception
523                index_data = self._process_index_file(file_path, page=page)
524                if index_data:
525                    return index_data
526        except Exception:527            log.warning(
528                'Unhandled exception during search processing file: %s',
529                page,
Catching too general exception Exception
480            content = self._get_page_content(page)
481            if content:
482                return self._process_content(page, content)
483        except Exception as e:484            log.info('Failed to index page %s, %s', page, str(e))
485        return {
486            'path': page,