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

core-admin(-client): --quiet & --verbose broken #3357

Open
jpouellet opened this Issue Nov 30, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@jpouellet
Contributor

jpouellet commented Nov 30, 2017

As best I can tell, the intended behavior is for objects returned by qubes(admin).tools.QubesArgumentParser.parse_args() to only have a verbose integer property (defaulting to 1, incremented by --verbose, decremented by --quiet), and for consumers of the API to just compare against the value of the verbose property, as if a quiet property did not exist.

This seems to be the way things worked until around QubesOS/qubes-core-admin@015b01f when some refactoring stopped computing the single verbosity integer by default, leading to --quiet for most qvm-* tools having no effect.

Also, there is a bunch of code duplication between qubes and qubesadmin, with slight divergences, and I'd have to fix this in both. Is there a reason to want to maintain both separately? Or should some parts (e.g. the qubes(admin).tools utility module) first be factored out and the code deduplicated?

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Nov 30, 2017

Contributor

Well, it does still compute a single verbosity integer, but only privately for use in e.g. setting logging levels, not in the returned namespace - which makes me question if perhaps now tools are expected to handle checking a quiet property themselves?

Contributor

jpouellet commented Nov 30, 2017

Well, it does still compute a single verbosity integer, but only privately for use in e.g. setting logging levels, not in the returned namespace - which makes me question if perhaps now tools are expected to handle checking a quiet property themselves?

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Nov 30, 2017

Contributor

/cc @woju

Contributor

jpouellet commented Nov 30, 2017

/cc @woju

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment