ImportUser with the Italian format is unable to handle directories
@lw is already working on this.
Since Jun 17, 2016.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 412
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 3
Description
Try running cmsImportUser with no parameters inside a directory containing a valid contest (e.g. con_test). It will fail saying that contest.yaml is missing.
As far as I can tell the same happens with arguments pointing to directories.
The reason for that is a combination of os.path.abspath in ImportUser.py, which strips trailing slashes if present, and of os.path.dirname in italy_yaml.py's get_user, which strips the last component of the path. This means that with input /foo/bar/ the file is searched in /foo/contest.yaml.
I will fix that shortly, I'm just posting here to gather feedback, if any.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.