1
0
Fork 0
forked from github/pelican

generators: Remove wonky argument handling from Generator.__init__

This commit is contained in:
W. Trevor King 2013-01-05 11:41:33 -05:00
commit 12dd35ef36

View file

@ -31,10 +31,14 @@ logger = logging.getLogger(__name__)
class Generator(object):
"""Baseclass generator"""
def __init__(self, *args, **kwargs):
for idx, item in enumerate(('context', 'settings', 'path', 'theme',
'output_path', 'markup')):
setattr(self, item, args[idx])
def __init__(self, context, settings, path, theme, output_path, markup,
**kwargs):
self.context = context
self.settings = settings
self.path = path
self.theme = theme
self.output_path = output_path
self.markup = markup
for arg, value in kwargs.items():
setattr(self, arg, value)