From 315fd0b88b0c263e83bcc47fbeb242c38ed01d02 Mon Sep 17 00:00:00 2001 From: Michael E Brown Date: Sat, 1 Dec 2007 13:25:11 -0600 Subject: convert @decorator-syntax to use python-2.3 compatible peak decoratortools syntax. --- py/mock.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'py/mock.py') 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.") -- cgit