commit:     fe2309bb2c7a0a15538b7cd515847f6188f334c0
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 17 00:42:29 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Sep 29 17:20:21 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fe2309bb

sync/syncbase.py: Fix the self.has_bin logic

---
 pym/portage/sync/syncbase.py | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/pym/portage/sync/syncbase.py b/pym/portage/sync/syncbase.py
index 2b6b8c7..94d4aab 100644
--- a/pym/portage/sync/syncbase.py
+++ b/pym/portage/sync/syncbase.py
@@ -34,16 +34,18 @@ class SyncBase(object):
                self.repo = None
                self.xterm_titles = None
                self.spawn_kwargs = None
-               self.bin_command = portage.process.find_binary(bin_command)
-
-               self.has_bin = True
-               if bin_command and self.bin_command is None:
-                       msg = ["Command not found: %s" % bin_command,
-                       "Type \"emerge %s\" to enable %s support." % (bin_pkg, 
bin_command)]
-                       for l in msg:
-                               writemsg_level("!!! %s\n" % l,
-                                       level=self.logger.ERROR, noiselevel=-1)
-                       self.has_bin = False
+               self.bin_command = None
+               self.has_bin = False
+               if bin_command:
+                       self.bin_command = 
portage.process.find_binary(bin_command)
+                       if self.bin_command is None:
+                               msg = ["Command not found: %s" % bin_command,
+                               "Type \"emerge %s\" to enable %s support." % 
(bin_pkg, bin_command)]
+                               for l in msg:
+                                       writemsg_level("!!! %s\n" % l,
+                                               level=self.logger.ERROR, 
noiselevel=-1)
+                       else:
+                               self.has_bin = True
 
 
        def _kwargs(self, kwargs):

Reply via email to