[equo] use blocking mode when acquiring the shared lock

This avoids tainting stdout with "please wait" messages
This commit is contained in:
Fabio Erculiani
2012-02-15 20:07:33 +01:00
parent 1371a8d540
commit d02d4e9356
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -84,7 +84,9 @@ def query(options):
return 1
from entropy.client.interfaces import Client
etp_client = Client()
acquired = entropy.tools.acquire_entropy_locks(etp_client, shared=True)
# do not taint stdout, use blocking mode
acquired = entropy.tools.acquire_entropy_locks(etp_client, shared=True,
blocking=True)
if not acquired:
print_error(darkgreen(_("Another Entropy is currently running.")))
return 1
+2 -1
View File
@@ -53,8 +53,9 @@ def ugc(options):
print_error(darkgreen(_("You are not in the entropy group.")))
return 1
entropy_client = Client()
# do not taint stdout, use blocking mode
acquired = entropy.tools.acquire_entropy_locks(
entropy_client, shared=True)
entropy_client, shared=True, blocking=True)
if not acquired:
print_error(darkgreen(_("Another Entropy is currently running.")))
return 1