From: Tony Asleson <tasleson@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - lvmdbusd: Handle 'exit' for lvm_shell_proxy
Date: Mon, 19 Sep 2022 15:58:35 +0000 (GMT) [thread overview]
Message-ID: <20220919155835.615293858292@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9fc24b1d3b205af1b2e3c4799c575e72a8640842
Commit: 9fc24b1d3b205af1b2e3c4799c575e72a8640842
Parent: b3d13c50d7adb838675929968317f9e42a2f485f
Author: Tony Asleson <tasleson@redhat.com>
AuthorDate: Tue Sep 6 16:24:20 2022 -0500
Committer: Tony Asleson <tasleson@redhat.com>
CommitterDate: Fri Sep 16 10:49:37 2022 -0500
lvmdbusd: Handle 'exit' for lvm_shell_proxy
Useful for testing `exit_shell` when running interactively.
---
daemons/lvmdbusd/lvm_shell_proxy.py.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index 9696a70a5..fb6ce6164 100755
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -280,6 +280,9 @@ if __name__ == "__main__":
while in_line:
in_line = input("lvm> ")
if in_line:
+ if in_line == "exit":
+ shell.exit_shell()
+ sys.exit(0)
start = time.time()
ret, out, err = shell.call_lvm(in_line.split())
end = time.time()
reply other threads:[~2022-09-19 15:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220919155835.615293858292@sourceware.org \
--to=tasleson@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.