diff options
author | Tony Asleson <tasleson@redhat.com> | 2022-06-07 08:21:03 -0500 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2022-06-30 10:55:16 -0500 |
commit | 01ef2f2525e8733f01443987b2c6f99882e04f3d (patch) | |
tree | 677daa4892a97be5fdc10f1b5f1d96f76c8bd99a | |
parent | 0d957dcacc3118e9f2d4e83830d6c93b8955fd5f (diff) | |
download | lvm2-01ef2f2525e8733f01443987b2c6f99882e04f3d.tar.gz |
lvmdbusd: Remove try/except for mkfifo
We should never run into this error condition when using tempfile.mkdtemp.
-rw-r--r-- | daemons/lvmdbusd/lvm_shell_proxy.py.in | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in index fa2415fcf..5802d2d70 100644 --- a/daemons/lvmdbusd/lvm_shell_proxy.py.in +++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in @@ -122,11 +122,8 @@ class LVMShellProxy(object): tmp_dir = tempfile.mkdtemp(prefix="lvmdbus_") tmp_file = "%s/lvmdbus_report" % (tmp_dir) - try: - # Let's create a fifo for the report output - os.mkfifo(tmp_file, 0o600) - except FileExistsError: - pass + # Create a fifo for the report output + os.mkfifo(tmp_file, 0o600) # Open the fifo for use to read and for lvm child process to write to. self.report_fd = os.open(tmp_file, os.O_NONBLOCK) |