From 858ee78fbebe161a4cdd707a469dc0f045211a51 Mon Sep 17 00:00:00 2001 From: Max Harmathy Date: Wed, 25 Aug 2021 13:05:58 +0200 Subject: [PATCH] Use reason_phrase instead of get_phrase --- src/Services/Cache.vala | 2 +- src/Services/Network.vala | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Services/Cache.vala b/src/Services/Cache.vala index 2251697..2ed314e 100644 --- a/src/Services/Cache.vala +++ b/src/Services/Cache.vala @@ -88,7 +88,7 @@ public class Tootle.Cache : GLib.Object { try { var code = msg.status_code; if (code != Soup.Status.OK) { - var error = network.describe_error (code); + var error = msg.reason_phrase; throw new Oopsie.INSTANCE (@"Server returned $error"); } diff --git a/src/Services/Network.vala b/src/Services/Network.vala index fa2839c..d0143b0 100644 --- a/src/Services/Network.vala +++ b/src/Services/Network.vala @@ -56,7 +56,7 @@ public class Tootle.Network : GLib.Object { else if (status == Soup.Status.CANCELLED) debug ("Message is cancelled. Ignoring callback invocation."); else - ecb ((int32) status, describe_error ((int32) status)); + ecb ((int32) status, msg.reason_phrase); }); } catch (Error e) { @@ -65,11 +65,6 @@ public class Tootle.Network : GLib.Object { } } - public string describe_error (uint code) { - var reason = Soup.Status.get_phrase (code); - return @"$code: $reason"; - } - public void on_error (int32 code, string message) { warning (message); app.toast (message); ion value='grep'>log msg
path: root/gnu/tests/monitoring.scm
s): New procedures. (draw-info-page): Add call to 'run-form-with-clients'. (run-input-page): Likewise. Handle EXIT-REASON equal to 'exit-fd-ready. (run-confirmation-page): Likewise. (run-listbox-selection-page): Likewise. Define 'choice->item' and use it. (run-checkbox-tree-page): Likewise. (run-file-textbox-page): Add call to 'run-form-with-clients'. Handle 'exit-fd-ready'. * gnu/installer/newt/partition.scm (run-disk-page): Pass #:client-callback-procedure to 'run-listbox-selection-page'. * gnu/installer/newt/user.scm (run-user-page): Call 'run-form-with-clients'. Handle 'exit-fd-ready'. * gnu/installer/newt/welcome.scm (run-menu-page): Define 'choice->item' and use it. Call 'run-form-with-clients'. * gnu/installer/newt/final.scm (run-install-success-page) (run-install-failed-page): When (current-clients) is non-empty, call 'send-to-clients' without displaying a choice window.
AgeCommit message (Expand)Author
2021-04-12services: postgresql: Change service default socket directory....Fixes <https://bugs.gnu.org/46737>. PostgreSQL running with a different socket directory to the default one in the package itself breaks some services, this commit restores the previous behaviour where PostgreSQL by default will run with a socket directory that matches the default used by PostgreSQL packaged for Guix. Switching to a different default value can happen, but only alongside changing the PostgreSQL package. * gnu/services/databases.scm (<postgresql-config-file>)[socket-directory]: Change default to #false. * doc/guix.texi (Database Services): Update documentation, and specify a different value for disabling connections via sockets. * gnu/tests/guix.scm (%guix-data-service-os): Use default PostgreSQL behaviour. * gnu/tests/monitoring.scm (%zabbix-os): Likewise. * gnu/tests/web.scm (patchwork-os): Likewise. Signed-off-by: Leo Famulari <leo@famulari.name> Christopher Baines
2021-02-01Merge branch 'staging'Leo Famulari
2021-01-28services: postgresql: Add socket directory support....* gnu/services/databases.scm (postgresql-config-file-socket-directory): New procedure. (<postgresql-config-file>)[socket-directory]: New field. (postgresql-config-file-compiler): Honor it. (postgresql-activation): Create the socket directory if needed. * doc/guix.texi (Database Services): Document it. * gnu/tests/guix.scm (%guix-data-service-os): Adapt it. * gnu/tests/monitoring.scm (%zabbix-os): Ditto. * gnu/tests/web.scm (patchwork-os): Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Mathieu Othacehe
2021-01-04tests: monitoring: Use the latest postgresql for testing Zabbix....This avoids a package collision while building the operating-system profile. * gnu/tests/monitoring.scm (%zabbix-os): Use POSTGRESQL instead of POSTGRESQL-10. Leo Famulari
Ludovic Courtès
2020-02-22installer: Log important bits to syslog....* gnu/installer.scm (installer-program): Log crashes with 'syslog'. * gnu/installer/parted.scm (luks-format-and-open, luks-close) (mount-user-partitions, umount-user-partitions): Add 'syslog' calls. * gnu/installer/steps.scm (run-installer-steps): Log the running step with 'syslog'. * gnu/installer/utils.scm (run-shell-command): Add calls to 'syslog'. Ludovic Courtès