diff options
Diffstat (limited to 'py/mock')
-rw-r--r-- | py/mock/plugins/tmpfs.py | 6 | ||||
-rw-r--r-- | py/mock/plugins/yum_cache.py | 2 | ||||
-rwxr-xr-x | py/mock/trace_decorator.py | 8 | ||||
-rw-r--r-- | py/mock/util.py | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/py/mock/plugins/tmpfs.py b/py/mock/plugins/tmpfs.py index 4896d26..b3f2d07 100644 --- a/py/mock/plugins/tmpfs.py +++ b/py/mock/plugins/tmpfs.py @@ -22,8 +22,8 @@ def init(rootObj, conf): else: getLog().warning("Tmpfs plugin disabled. " "System does not have the required amount of RAM to enable the tmpfs plugin. " - "System has %sMB RAM, but the config specifies the minimum required is %sMB RAM. " - % + "System has %sMB RAM, but the config specifies the minimum required is %sMB RAM. " + % (system_ram_mb, conf['required_ram_mb'])) # classes @@ -48,5 +48,5 @@ class Tmpfs(object): getLog().info("unmounting tmpfs.") mountCmd = "umount -n %s" % self.rootObj.makeChrootPath() mock.util.do(mountCmd) - + diff --git a/py/mock/plugins/yum_cache.py b/py/mock/plugins/yum_cache.py index bcdf465..2e12b3f 100644 --- a/py/mock/plugins/yum_cache.py +++ b/py/mock/plugins/yum_cache.py @@ -83,7 +83,7 @@ class YumCache(object): os.unlink(fullPath) fullPath = None break - + if fullPath is None: continue if file_age_days > self.yum_cache_opts['max_age_days']: os.unlink(fullPath) diff --git a/py/mock/trace_decorator.py b/py/mock/trace_decorator.py index 05c340c..837afd7 100755 --- a/py/mock/trace_decorator.py +++ b/py/mock/trace_decorator.py @@ -18,7 +18,7 @@ class getLog(object): if name is None: frame = sys._getframe(1) name = frame.f_globals["__name__"] - + self.name = prefix + name def __getattr__(self, name): @@ -44,11 +44,11 @@ def traceLog(log = None): # can override by passing logger=foo as function parameter. # make sure this doesnt conflict with one of the parameters # you are expecting - + filename = os.path.normcase(func.func_code.co_filename) func_name = func.func_code.co_name lineno = func.func_code.co_firstlineno - + l2 = kw.get('logger', log) if l2 is None: l2 = logging.getLogger("trace.%s" % func.__module__) @@ -61,7 +61,7 @@ def traceLog(log = None): for k,v in kw.items(): message = message + "%s=%s" % (k,repr(v)) message = message + ")" - + frame = sys._getframe(2) doLog(l2, logging.INFO, os.path.normcase(frame.f_code.co_filename), frame.f_lineno, message, args=[], exc_info=None, func=frame.f_code.co_name) try: diff --git a/py/mock/util.py b/py/mock/util.py index 8f3d221..c5550fd 100644 --- a/py/mock/util.py +++ b/py/mock/util.py @@ -188,7 +188,7 @@ PER_LINUX32=0x0008 PER_LINUX=0x0000 personality_defs = { 'x86_64': PER_LINUX, 'ppc64': PER_LINUX, 'sparc64': PER_LINUX, - 'i386': PER_LINUX32, 'i586': PER_LINUX32, 'i686': PER_LINUX32, + 'i386': PER_LINUX32, 'i586': PER_LINUX32, 'i686': PER_LINUX32, 'ppc': PER_LINUX32, 'sparc': PER_LINUX32, 'sparcv9': PER_LINUX32, 'ia64' : PER_LINUX, 'alpha' : PER_LINUX, } |