mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 23:23:27 +02:00
handle Queue
This commit is contained in:
parent
0e0767492e
commit
1683df0cf8
@ -29,12 +29,18 @@ import stat
|
|||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import operator
|
import operator
|
||||||
import Queue
|
|
||||||
import logging
|
import logging
|
||||||
import hashlib
|
import hashlib
|
||||||
import socket
|
import socket
|
||||||
import xml.etree.ElementTree as XMLElementTree
|
import xml.etree.ElementTree as XMLElementTree
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Python 2
|
||||||
|
from Queue import Queue
|
||||||
|
except ImportError:
|
||||||
|
# Python 3
|
||||||
|
from queue import Queue
|
||||||
|
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
import metadata
|
import metadata
|
||||||
@ -1606,7 +1612,7 @@ def FDroidPopen(commands, cwd=None, output=True):
|
|||||||
raise BuildException("OSError while trying to execute " +
|
raise BuildException("OSError while trying to execute " +
|
||||||
' '.join(commands) + ': ' + str(e))
|
' '.join(commands) + ': ' + str(e))
|
||||||
|
|
||||||
stdout_queue = Queue.Queue()
|
stdout_queue = Queue()
|
||||||
stdout_reader = AsynchronousFileReader(p.stdout, stdout_queue)
|
stdout_reader = AsynchronousFileReader(p.stdout, stdout_queue)
|
||||||
|
|
||||||
# Check the queue for output (until there is no more to get)
|
# Check the queue for output (until there is no more to get)
|
||||||
|
Loading…
Reference in New Issue
Block a user