ajenti / ajenti

Exception caught is very general PYL-W0703
Anti-pattern
Major
6 months ago4 years old
Catching too general exception Exception
388                if mtime <= rtime:
389                    self.respond('304 Not Modified')
390                    return
391            except Exception as e:392                pass
393
394        http_range = self.env.get('HTTP_RANGE', None)
Catching too general exception Exception
 66                    try:
 67                        shell = subprocess.check_output(['which', sh])
 68                        break
 69                    except Exception as e: 70                        pass
 71            self.command = shell
 72
Catching too general exception Exception
 67        try:
 68            svc.running = self._run_action(_id, 'status')
 69            svc.state = 'running' if svc.running else 'stopped'
 70        except Exception as e: 71            svc.running = False
 72        return svc
 73
Catching too general exception Exception
 18        try:
 19            yum.YumBase().doGenericSetup(cache=1)
 20            return True
 21        except Exception as e: 22            return False
 23
 24    def __init__(self, context):
Catching too general exception Exception
157        chunk_dir = f'/tmp/upload-{id}'
158        try:
159            os.makedirs(chunk_dir)
160        except Exception as e:161            pass
162        chunk_path = os.path.join(chunk_dir, chunk_index)
163