all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] http client: suppress "storing login ticket"-error when not using a TTY
@ 2023-01-05 10:19 Fiona Ebner
  2023-01-05 11:30 ` [pbs-devel] applied: " Wolfgang Bumiller
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2023-01-05 10:19 UTC (permalink / raw)
  To: pbs-devel

as a stop-gap measure. Otherwise, task logs for PVE backups started
via non-CLI will have the message
> storing login ticket failed: $XDG_RUNTIME_DIR must be set
show up when running a proxmox-backup-client command (e.g. setting
notes and when uploading the log). This is confusing to users[0].

[0]: https://forum.proxmox.com/threads/120492/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 pbs-client/src/http_client.rs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index 1317517f..d9f6b7af 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -458,7 +458,9 @@ impl HttpClient {
                                 &auth.ticket,
                                 &auth.token,
                             ) {
-                                log::error!("storing login ticket failed: {}", err);
+                                if tty::stdout_isatty() {
+                                    log::error!("storing login ticket failed: {}", err);
+                                }
                             }
                         }
                         *auth2.write().unwrap() = auth;
@@ -494,7 +496,9 @@ impl HttpClient {
                         &auth.ticket,
                         &auth.token,
                     ) {
-                        log::error!("storing login ticket failed: {}", err);
+                        if tty::stdout_isatty() {
+                            log::error!("storing login ticket failed: {}", err);
+                        }
                     }
                 }
                 *authinfo.write().unwrap() = auth;
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] http client: suppress "storing login ticket"-error when not using a TTY
  2023-01-05 10:19 [pbs-devel] [PATCH proxmox-backup] http client: suppress "storing login ticket"-error when not using a TTY Fiona Ebner
@ 2023-01-05 11:30 ` Wolfgang Bumiller
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bumiller @ 2023-01-05 11:30 UTC (permalink / raw)
  To: Fiona Ebner; +Cc: pbs-devel

applied, thanks




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-05 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 10:19 [pbs-devel] [PATCH proxmox-backup] http client: suppress "storing login ticket"-error when not using a TTY Fiona Ebner
2023-01-05 11:30 ` [pbs-devel] applied: " Wolfgang Bumiller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal