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

Cannot use --servers command line option in ngasArchiveClient #38

Closed
smclay opened this issue Jan 5, 2021 · 1 comment
Closed

Cannot use --servers command line option in ngasArchiveClient #38

smclay opened this issue Jan 5, 2021 · 1 comment
Labels

Comments

@smclay
Copy link
Contributor

smclay commented Jan 5, 2021

The python NGAS archive client application cannot use the --servers command line option value. At line 90 in ngamsPClient.py an exception is raised when the servers and host/port command line options are set. As the host and port command line values are assigned default values this means an exception will always be raised when the --servers is used.

The simple solution would be to remove the default values for the host/port command line options. Otherwise grant the servers command line option precedence when it is set.

rtobar added a commit that referenced this issue Jan 6, 2021
The ClientWrapper class in the fs_monitor module was always creating an
ngamsPClient object with host, port and servers, although they are
mutually exclusive arguments (host/port and servers). This was only
triggered when users specified the --servers flag on the
ngamsArchiveClient utility.

This commit fixes this situation, and adds a new unit test to ensure the
--servers flag continues working as expected.

This addresses #38.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@rtobar
Copy link
Contributor

rtobar commented Jan 6, 2021

Thanks @smclay for reporting this. A fix has now been merged to the master branch. A new unit test ensures the --servers flag can be used successfully.

@rtobar rtobar closed this as completed Jan 6, 2021
@rtobar rtobar added the bug label Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants