From 5cf93d0d9459e7a9b80f1dfb0efe4623a268c0bb Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 14 Dec 2020 17:40:49 -0500 Subject: [PATCH] Remove unnecessary files --- .upnot | 1 - rnd | 9 --------- 2 files changed, 10 deletions(-) delete mode 100644 .upnot delete mode 100644 rnd diff --git a/.upnot b/.upnot deleted file mode 100644 index b68fa74..0000000 --- a/.upnot +++ /dev/null @@ -1 +0,0 @@ -The json file for configs diff --git a/rnd b/rnd deleted file mode 100644 index 2d36680..0000000 --- a/rnd +++ /dev/null @@ -1,9 +0,0 @@ - -I have an async function and would like to use subprocess.Popen instead of subprocess.run() to avoid blocking the thread. Using the communicate() function blocks the thread, and I'm worried about using shell=True because a password is being passed. The current function gives me an `unsupported fileno` exception. Popen.stdin.write() causes the subprocess to hang forever as if it were never started. I can still use sudo in another terminal when this happens. - - - proc = subprocess.Popen(['sudo', '-S', 'apt-get', cmd, '-y'], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - stdin=io.BytesIO(password.encode())) -