Skip to content

Fix bare except blocks #299

Description

@avinxshKD

There are a lot of bare except: statements throughout the code that catch everything including KeyboardInterrupt and SystemExit. Makes debugging painful, if something hangs you can't even Ctrl+C out of it, and actual errors get silently swallowed

Worst is cwrap.py which has 15+ bare excepts like

try:
    apikey=open(concore.inpath+'1/concore.apikey',newline=None).readline().rstrip()
except:
    apikey = ''

These should at minimum be except Exception: to avoid catching system-level stuff, or better yet catch specific exceptions like FileNotFoundError or IOError depending on what could actually fail. Not critical but would make debugging way easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions