sanketsaurav / lore

Do not use bare except, specify exception instead FLK-E722
Bug risk
Minor
4 years ago5 years old
do not use bare 'except'
406            else:
407                try:
408                    submission_aggregator.submit()
409                except:410                    report_exception()
411    atexit.register(librato_submit, False)
412
do not use bare 'except'
384                else:
385                    _librato_timer = threading.Timer(LIBRATO_MIN_AGGREGATION_PERIOD, librato_submit)
386                    _librato_timer.start()
387        except:388            report_exception()
389
390    def librato_submit(background=True):
do not use bare 'except'
353                _librato_start = None
354                _librato_lock = threading.RLock()
355                logger.info('connected to librato with user: %s' % os.getenv('LIBRATO_USER'))
356            except:357                logger.exception('unable to start librato')
358                report_exception()
359                _librato = None
do not use bare 'except'
 942    try:
 943        if subprocess.check_output(('brew', 'ls', '--versions', 'graphviz')):
 944            return
 945    except: 946        pass
 947    print(ansi.success('INSTALL') + ' graphviz')
 948    subprocess.check_call(('brew', 'install', 'graphviz'))