Bug 8360 - Some internal functions print to stderr when we don't want
Summary: Some internal functions print to stderr when we don't want
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-04 14:39 CEST by Linn
Modified: 2024-06-18 13:13 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Linn cendio 2024-06-04 14:39:17 CEST
When we introduced tab completion in bug 7867, we noticed that some scripts printed errors and warnings on the commandline while tabcompleting, see example from tlctl below.
> tlctl session list <tab>tlctl: error: could not retrieve data from the master: Permission denied
> tlctl: error: could not retrieve data from the master: Permission denied
Our current architecture in tlctl has no flexibility to consider what features the caller is interested in, and the caller has no way of controlling its call to get these special features.

In practice, we have run into this issue when wanting to silence errors during tab completions. In tlctl, it is currently solved is by temporarily redirect stderr. However, it would be better to move more control into the hands of the caller.

The same issue is seen in hivetool, where warnings.warn() is used to be able to silence errors during tab completion.

Despite solving the issue in different ways, I believe a solution to this bug could be applicable to both scripts.

Note You need to log in before you can comment on or make changes to this bug.