Merge pull request #1887 from kjkuan/develop

Pass __opts__ to the invocation of __init__ in a salt module.
This commit is contained in:
Thomas S Hatch 2012-08-27 12:13:58 -07:00
commit 7f517521e2
2 changed files with 3 additions and 3 deletions

View File

@ -312,7 +312,7 @@ class Loader(object):
if hasattr(mod, '__init__'):
if callable(mod.__init__):
try:
mod.__init__()
mod.__init__(self.opts)
except TypeError:
pass
funcs = {}
@ -435,7 +435,7 @@ class Loader(object):
if hasattr(mod, '__init__'):
if callable(mod.__init__):
try:
mod.__init__()
mod.__init__(self.opts)
except TypeError:
pass

View File

@ -17,7 +17,7 @@ def __virtual__():
return 'pkg' if __grains__['os'] in ('Debian', 'Ubuntu') else False
def __init__():
def __init__(opts):
'''
For Debian and derivative systems, set up
a few env variables to keep apt happy and