Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle malformed mountpoint directory input #5

Open
mharvilla opened this issue Feb 3, 2024 · 0 comments
Open

Handle malformed mountpoint directory input #5

mharvilla opened this issue Feb 3, 2024 · 0 comments

Comments

@mharvilla
Copy link
Collaborator

valdi volume mount mounting-test ~?mnt
Traceback (most recent call last):
  File "/usr/lib/python3.8/pathlib.py", line 384, in gethomedir
    return pwd.getpwnam(username).pw_dir
KeyError: "getpwnam(): name not found: '?mnt'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.venv/bin/valdi", line 8, in <module>
    sys.exit(main())
  File "/home/user/.venv/lib/python3.8/site-packages/valdi/entrypoint.py", line 34, in main
    ServiceRouter.route_to_service(args)
  File "/home/user/.venv/lib/python3.8/site-packages/valdi/router/service_router.py", line 20, in route_to_service
    volume_manager.mount_volume(args.volume_name, args.mountpoint)
  File "/home/user/.venv/lib/python3.8/site-packages/valdi/cli/volume_manager.py", line 38, in mount_volume
    mount_point = Path(mountpoint).expanduser()
  File "/usr/lib/python3.8/pathlib.py", line 1556, in expanduser
    homedir = self._flavour.gethomedir(self._parts[0][1:])
  File "/usr/lib/python3.8/pathlib.py", line 386, in gethomedir
    raise RuntimeError("Can't determine home directory "
RuntimeError: Can't determine home directory for '?mnt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant