Remove @entry decorator (and misc cleanup)

This commit is contained in:
Anthony Sottile
2015-01-04 11:08:53 -08:00
parent 9bfa01da81
commit 2f1d2bbe5b
13 changed files with 25 additions and 88 deletions

View File

@ -1,15 +0,0 @@
import functools
import sys
def entry(func):
"""Allows a function that has `argv` as an argument to be used as a
commandline entry. This will make the function callable using either
explicitly passed argv or defaulting to sys.argv[1:]
"""
@functools.wraps(func)
def wrapper(argv=None):
if argv is None:
argv = sys.argv[1:]
return func(argv)
return wrapper