diff --git a/src/mpsd_hpc_tools/quota.py b/src/mpsd_hpc_tools/quota.py index fb93889b4cc5ac5dcb316f447ef1b269fe8b4c4a..2e0310d50bca4f65d00db7ca0b64196770bc08d6 100644 --- a/src/mpsd_hpc_tools/quota.py +++ b/src/mpsd_hpc_tools/quota.py @@ -160,19 +160,15 @@ def main(argv=None): user = args.user # check user exists - homedir = pathlib.Path("/home") / user - if not homedir.is_dir(): - sys.stderr.write(f"Home directory {str(homedir)} does not exist ({user=}).\n") - sys.exit(1) # print header print_quota_line("#location", "size", "used", "avail", "use", raw=True) # print home quota + homedir = pathlib.Path("/home") / user print_quota_line(homedir, *df_mountpoint(homedir), raw=args.bytes) + # print scratch quota scratchdir = pathlib.Path("/scratch") / user - # only proceed if user has a directory on /scratch - if scratchdir.is_dir(): - print_quota_line(scratchdir, *df_ceph(scratchdir), raw=args.bytes) + print_quota_line(scratchdir, *df_ceph(scratchdir), raw=args.bytes) if __name__ == "__main__":