A gui application used for interactive upgrade reminders on Debian. I no longer use it and will not push changes.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

10 lines
718 B

  1. 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.
  2. proc = subprocess.Popen(['sudo', '-S', 'apt-get', cmd, '-y'],
  3. stdout=subprocess.PIPE,
  4. stderr=subprocess.STDOUT,
  5. stdin=io.BytesIO(password.encode()))