Skip to content

bug: 8 bare except:pass clauses silently swallowing all errors across buskill/__init__.py #115

@RockyOmvi

Description

@RockyOmvi

Describe the bug

There are 8 bare except: pass clauses across src/packages/buskill/__init__.py that silently swallow all exceptions, including KeyboardInterrupt and SystemExit. This makes debugging nearly impossible — genuine errors (AttributeError, TypeError, etc.) are completely hidden, and the process cannot be killed cleanly via Ctrl+C.

Locations

Line Code What it masks
479-480 except:\n pass self.usb_handler.join() failures (incl. AttributeError if handler is None)
492-493 except:\n pass self.upgrade_process.join() failures
498-499 except:\n pass wipeCache() failures
935-936 except:\n pass self.usb_handler.kill() / .join() — masks any exception
1601-1602 except:\n pass umount failures
1610-1611 except:\n pass os.makedirs() / os.chmod() failures
1867-1868 except:\n pass KEYS file read failures (bare except catches everything)
894-896 except:\n pass setupDataDir() missing attribute access

Expected behavior

Replace bare except: pass with specific exception types and at minimum log the error:

except Exception as e:
    logger.error(f"Failed to do X: {e}")

For cleanup operations where failure is acceptable, still log at debug level instead of silencing completely.

Severity

Medium — 8 locations silently hiding errors, degrading debuggability and preventing graceful shutdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions