summaryrefslogtreecommitdiffstats
path: root/py/mock.py
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-12-01 13:25:11 -0600
committerMichael E Brown <mebrown@michaels-house.net>2007-12-01 13:25:11 -0600
commit315fd0b88b0c263e83bcc47fbeb242c38ed01d02 (patch)
treef3fd41047a82137defea5899e74a7f8962804033 /py/mock.py
parent42b1c5f9a0b81d0d0c10a07e23c446ac78e8f98b (diff)
downloadmock-315fd0b88b0c263e83bcc47fbeb242c38ed01d02.tar.gz
mock-315fd0b88b0c263e83bcc47fbeb242c38ed01d02.tar.xz
mock-315fd0b88b0c263e83bcc47fbeb242c38ed01d02.zip
convert @decorator-syntax to use python-2.3 compatible peak decoratortools syntax.
Diffstat (limited to 'py/mock.py')
-rwxr-xr-xpy/mock.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/py/mock.py b/py/mock.py
index 0d0c312..e4618d6 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -29,6 +29,7 @@ import os.path
import sys
import time
from optparse import OptionParser
+from peak.util.decorators import decorate
# all of the variables below are substituted by the build system
__VERSION__="unreleased_version"
@@ -143,7 +144,7 @@ def command_parse(config_opts):
return (options, args)
-@traceLog(log)
+decorate(traceLog(log))
def setup_default_config_opts(config_opts):
# global
config_opts['basedir'] = '/var/lib/mock/' # root name is automatically added to this
@@ -210,7 +211,7 @@ def setup_default_config_opts(config_opts):
'%_rpmfilename': '%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm',
}
-@traceLog(log)
+decorate(traceLog(log))
def set_config_opts_per_cmdline(config_opts, options):
# do some other options and stuff
if options.arch:
@@ -252,11 +253,11 @@ def set_config_opts_per_cmdline(config_opts, options):
config_opts['online'] = options.online
-@traceLog(log)
+decorate(traceLog(log))
def warn_obsolete_config_options(config_opts):
pass
-@traceLog(log)
+decorate(traceLog(log))
def do_rebuild(config_opts, chroot, srpms):
if len(srpms) < 1:
log.critical("No package specified to rebuild command.")