summaryrefslogtreecommitdiffstats
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rwxr-xr-xpy/mock.py10
-rw-r--r--py/mock/plugins/tmpfs.py6
-rw-r--r--py/mock/plugins/yum_cache.py2
-rwxr-xr-xpy/mock/trace_decorator.py8
-rw-r--r--py/mock/util.py2
5 files changed, 14 insertions, 14 deletions
diff --git a/py/mock.py b/py/mock.py
index d27d73e..f5c7143 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -102,9 +102,9 @@ def command_parse(config_opts):
help="Copy file(s) into the specified chroot")
parser.add_option("--copyout", action="store_const", const="copyout",
- dest="mode",
+ dest="mode",
help="Copy file(s) from the specified chroot")
-
+
# options
parser.add_option("-r", "--root", action="store", type="string", dest="chroot",
help="chroot name/config file name default: %default",
@@ -212,8 +212,8 @@ def setup_default_config_opts(config_opts, unprivUid):
config_opts['cleanup_on_failure'] = 1
# (global) plugins and plugin configs.
- # ordering constraings: tmpfs must be first.
- # root_cache next.
+ # ordering constraings: tmpfs must be first.
+ # root_cache next.
# after that, any plugins that must create dirs (yum_cache)
# any plugins without preinit hooks should be last.
config_opts['plugins'] = ('tmpfs', 'root_cache', 'yum_cache', 'bind_mount', 'ccache')
@@ -411,7 +411,7 @@ def main(ret):
setup_default_config_opts(config_opts, unprivUid)
(options, args) = command_parse(config_opts)
- if options.printrootpath:
+ if options.printrootpath:
options.verbose = 0
# config path -- can be overridden on cmdline
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,
}