Skip to content

Crashing with unknown uid #1567

@paholg

Description

@paholg

Running mycli with a socket owned by an unknown user causes getpwuid() to return an error.

This can happen when the socket is owned by a docker container. That call is only used for a log message; it should be wrapped in a try/except.

The offending line is here:

socket_owner = getpwuid(os.stat(socket).st_uid).pw_name

Steps to Reproduce

Bind a socket from a mysql docker container to the host, and try to run mycli on the host.

System

  • mycli version: 1.44.2
  • OS/version: NixOs unstable.

Metadata

Metadata

Assignees

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