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

Fix cylc-search for directories without suite.rc #3085

Merged
merged 1 commit into from
Apr 8, 2019

Conversation

kinow
Copy link
Member

@kinow kinow commented Apr 6, 2019

cylc search /home/kinow/cylc-run/five/share foo*

Works fine. But using another directory, the previous version would print usage and exit with a non zero exit code. Current version in master is broken.

$ cylc search /home/kinow/cylc-run/five/share foo*
Traceback (most recent call last):
  File "/home/kinow/Development/python/workspace/cylc/venv/bin/cylc-search", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/kinow/Development/python/workspace/cylc/bin/cylc-search", line 196, in <module>
    main()
  File "/home/kinow/Development/python/workspace/cylc/lib/cylc/terminal.py", line 65, in wrapper
    function(*args, **kwargs)
  File "/home/kinow/Development/python/workspace/cylc/bin/cylc-search", line 94, in main
    parser.error("File not found: " + suiterc)
NameError: name 'parser' is not defined

This small fix unfortunately removes the function to parse args (which is good to encapsulate that part...) in order to keep the exact previous behaviour without having to copy or mimic the calls to print usage and exit status.

@kinow kinow self-assigned this Apr 6, 2019
@kinow kinow added bug Something is wrong :( small labels Apr 6, 2019
@kinow kinow added this to the cylc-8.0a1 milestone Apr 6, 2019
@kinow
Copy link
Member Author

kinow commented Apr 6, 2019

Note: these small issues are left-over of Cylc7 -> Cylc8 migration (packaging, refactorings, py3, etc), so I am not creating tickets and worrying about the changelog, as I think these issues are not interesting for users concerned about updating to Cylc 8 👍

@kinow kinow force-pushed the fix-cylc-search branch from 91cae39 to edf813d Compare April 8, 2019 05:57
@hjoliver hjoliver merged commit 556b382 into cylc:master Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants