Commit b49fd084 authored by Simon Chabot's avatar Simon Chabot
Browse files

refactor: use callable_deprecated() instead of deprecated()

parent 4e491912fc70
......@@ -32,7 +32,7 @@ from os.path import basename
from logilab.common.configuration import Configuration
from logilab.common.logging_ext import init_log, get_threshold
from logilab.common.deprecation import deprecated
from logilab.common.deprecation import callable_deprecated
class BadCommandUsage(Exception):
......@@ -330,14 +330,14 @@ Copyright (c) 2004-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
http://www.logilab.fr/ -- mailto:contact@logilab.fr"""
@deprecated("use cls.register(cli)")
@callable_deprecated("use cls.register(cli)")
def register_commands(commands):
"""register existing commands"""
for command_klass in commands:
_COMMANDS.register(command_klass)
@deprecated("use args.pop(0)")
@callable_deprecated("use args.pop(0)")
def main_run(args, doc=None, copyright=None, version=None):
"""command line tool: run command specified by argument list (without the
program name). Raise SystemExit with status 0 if everything went fine.
......@@ -350,7 +350,7 @@ def main_run(args, doc=None, copyright=None, version=None):
_COMMANDS.run(args)
@deprecated("use args.pop(0)")
@callable_deprecated("use args.pop(0)")
def pop_arg(args_list, expected_size_after=None, msg="Missing argument"):
"""helper function to get and check command line arguments"""
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment