From d02d4e9356af07a57d4db6b0ff2c1836e4f416ec Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 15 Feb 2012 20:07:33 +0100 Subject: [PATCH] [equo] use blocking mode when acquiring the shared lock This avoids tainting stdout with "please wait" messages --- client/text_query.py | 4 +++- client/text_ugc.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/text_query.py b/client/text_query.py index f46655728..a0ef12b68 100644 --- a/client/text_query.py +++ b/client/text_query.py @@ -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 diff --git a/client/text_ugc.py b/client/text_ugc.py index 33a6fcb3a..5880024de 100644 --- a/client/text_ugc.py +++ b/client/text_ugc.py @@ -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