[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [emerge] bin: some minor cleanups
From:       Patrick Spendrin <ps_ml () gmx ! de>
Date:       2015-08-31 22:58:33
Message-ID: E1ZWY25-0000uF-Dd () scm ! kde ! org
[Download RAW message or body]

Git commit c825cde93a38001d2c074eba1eaf3c829d279d52 by Patrick Spendrin.
Committed on 31/08/2015 at 22:37.
Pushed by sengels into branch 'master'.

some minor cleanups

M  +6    -12   bin/options.py
M  +4    -3    bin/portage.py

http://commits.kde.org/emerge/c825cde93a38001d2c074eba1eaf3c829d279d52

diff --git a/bin/options.py b/bin/options.py
index 92d55b2..68f0b27 100644
--- a/bin/options.py
+++ b/bin/options.py
@@ -93,14 +93,16 @@ class OptionsFeatures(OptionsBase):
 
         ## whether to build the sqlite backend in akonadi instead of the mysql one
         self.akonadiBackendSqlite = False
-        
+
         ## enable python support in several packages.
         self.pythonSupport = False
 
-        
         ## stick to the gcc 4.4.7 version
         self.legacyGCC = False
 
+        ## enable or disable the dependency to plasma
+        self.fullplasma = False
+
 ## options for the fetch action
 class OptionsFetch(OptionsBase):
     def __init__(self):
@@ -221,8 +223,6 @@ class OptionsPackage(OptionsBase):
         ##disable stripping of binary files
         #needed for mysql, striping make the library unusable
         self.disableStriping = False
-        
-        
 
 class OptionsCMake(OptionsBase):
     def __init__(self):
@@ -341,18 +341,12 @@ class Options(object):
             value = value in ['True', 'true', '1', 'ON', 'on']
 
         setattr( currentObject, currentKey, value )
-
-#        p = ""
-#        if self.__instances[a][0]:
-#            p += self.__instances[a][0] + '.'
-#        if self.__verbose:
-#            print("mapped %s to %s%s with value %s" % (origKey, p, \
self.__instances[a][2][b][0], value))  return True
 
 
 
     def __readFromList( self, opts ):
-        """collect properties from a list of key=valule string"""
+        """collect properties from a list of key=value string"""
         if opts == None:
             return False
         result = False
@@ -361,7 +355,7 @@ class Options(object):
                 utils.debug('incomplete option %s' % entry, 3)
                 continue
             (key, value) = entry.split( '=', 1 )
-            if self.__setInstanceAttribute(key, value ):
+            if self.__setInstanceAttribute(key, value):
                 result = True
                 continue
         return result
diff --git a/bin/portage.py b/bin/portage.py
index 71ec6e2..fa3247e 100644
--- a/bin/portage.py
+++ b/bin/portage.py
@@ -203,7 +203,6 @@ class Portage(object):
         self.ignores = set()
         if ("Portage", "PACKAGE_IGNORES") in emergeSettings:
             self.ignores.update(emergeSettings.get("Portage","PACKAGE_IGNORES").split(";"))
                
-            
 
     def addPortageDir( self, directory ):
         """ adds the categories and packages of a portage directory """
@@ -271,7 +270,6 @@ class Portage(object):
                         self.categories[ category ].append( PackageObjectBase( \
                category=category, subpackage=package, package=subPackage, \
                enabled=_enabled ) )
                     self.subpackages[ subPackage ].append( category + "/" + package \
)  
-
     def getCategory( self, package ):
         """ returns the category of this package """
         utils.debug( "getCategory: %s" % package, 2 )
@@ -339,7 +337,10 @@ class Portage(object):
                 else:
                     modulename = os.path.basename( fileName )[:-3].replace('.', '_')
                     loader = importlib.machinery.SourceFileLoader(modulename, \
                fileName)
-                    mod = loader.load_module(modulename)
+                    try:
+                        mod = loader.load_module()
+                    except:
+                        raise PortageException("Failed to load file %s" % fileName, \
category, package)  if not mod is None:
                     subpackage, package = getSubPackage( category, package )
                     self._CURRENT_MODULE  = ( fileName, category,subpackage, \
package, mod )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic