commit:     5974cf67d2fc4d3ca6346f13db07dc15989f2977
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 14 16:14:26 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Mar 14 16:18:18 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5974cf67

portage/sync/syncbase.py: Complete rough in.

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

diff --git a/pym/portage/sync/syncbase.py b/pym/portage/sync/syncbase.py
index 95dcf5f..1d46c40 100644
--- a/pym/portage/sync/syncbase.py
+++ b/pym/portage/sync/syncbase.py
@@ -1,4 +1,12 @@
+'''
+Base class for performing sync operations.
+This class contains common initialization code and functions.
+'''
 
+import os
+
+import portage
+from portage.util import writemsg_level
 
 
 class SyncBase(object):
@@ -21,6 +29,7 @@ class SyncBase(object):
                self.logger = None
                self.repo = None
                self.xterm_titles = None
+               self.spawn_kwargs = None
                self.bin_command = portage.process.find_binary(bin_command)
 
                self.has_bin = True
@@ -29,7 +38,7 @@ class SyncBase(object):
                        "Type \"emerge %s\" to enable %s support." % (bin_pkg, 
bin_command)]
                        for l in msg:
                                writemsg_level("!!! %s\n" % l,
-                                       level=logging.ERROR, noiselevel=-1)
+                                       level=self.logger.ERROR, noiselevel=-1)
                        self.has_bin = False
 
 
@@ -40,6 +49,7 @@ class SyncBase(object):
                self.logger = self.options.get('logger', None)
                self.repo = self.options.get('repo', None)
                self.xterm_titles = self.options.get('xterm_titles', False)
+               self.spawn_kwargs = self.options.get('spawn_kwargs', None)
 
 
        def exists(self, **kwargs):
@@ -48,7 +58,7 @@ class SyncBase(object):
                        self._kwargs(kwargs)
                elif not self.repo:
                        return False
-               spawn_kwargs = self.options.get('spawn_kwargs', None)
+
 
                if not os.path.exists(self.repo.location):
                        return False

Reply via email to