Pārlūkot izejas kodu

Remove unnecessary files

master
= pirms 4 gadiem
vecāks
revīzija
5cf93d0d94
2 mainītis faili ar 0 papildinājumiem un 10 dzēšanām
  1. +0
    -1
      .upnot
  2. +0
    -9
      rnd

+ 0
- 1
.upnot Parādīt failu

@@ -1 +0,0 @@
The json file for configs

+ 0
- 9
rnd Parādīt failu

@@ -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()))


Notiek ielāde…
Atcelt
Saglabāt