Wait for output after snapraid commands
This commit is contained in:
1 parent
6af9025eea
commit
cd4d8c3f2e
1 file changed
+3
@@ -7,6 +7,7 @@ import os.path
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
from collections import Counter, defaultdict
|
from collections import Counter, defaultdict
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
@@ -55,6 +56,8 @@ def snapraid_command(command, args={}):
|
|||||||
for t in threads:
|
for t in threads:
|
||||||
t.join()
|
t.join()
|
||||||
ret = p.wait()
|
ret = p.wait()
|
||||||
|
# sleep for a while to make pervent output mixup
|
||||||
|
time.sleep(0.3)
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
return out
|
return out
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in new issue
Block a user