Fix issues with DistributionBuilder constructor

Making the base builder class a little more tolerant of the optional
arguments that could be passed in as well.
This commit is contained in:
Devan Goodwin 2012-03-15 12:23:54 -03:00
parent 7194a67482
commit f09f255834
2 changed files with 4 additions and 4 deletions

View file

@ -84,10 +84,10 @@ class Builder(object):
# Allow a builder arg to override the test setting passed in, used by
# releasers in their config sections.
if 'test' in args:
if args and 'test' in args:
self.test = True
if 'options' in kwargs:
if kwargs and 'options' in kwargs:
print("WARNING: 'options' no longer a supported builder "
"constructor argument.")

View file

@ -13,9 +13,9 @@ class DistributionBuilder(UpstreamBuilder):
Patch1: foo-1.2.13-2-to-foo-1.2.13-3-sat.patch
"""
def __init__(self, name=None, version=None, tag=None, build_dir=None,
pkg_config=None, global_config=None, user_config=None, options=None, args=None):
pkg_config=None, global_config=None, user_config=None, args=None, **kwargs):
UpstreamBuilder.__init__(self, name, version, tag, build_dir, pkg_config,
global_config, user_config, options)
global_config, user_config, args, **kwargs)
self.patch_files = []
def patch_upstream(self):