Skip to content

Commit 563dabb

Browse files
committed
fix: renamed varibles to avoid shadowing
1 parent a212ec7 commit 563dabb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mamonsu/lib/get_keys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
class GetKeys(object):
66
plg_type = 'all'
77

8-
def txt(self, type, plugins=None):
8+
def txt(self, plg_type, plugins=None):
99
# sort plugins!
1010
if plugins is None:
1111
plugins = []
12-
self.plg_type = type
12+
self.plg_type = plg_type
1313
plugins.sort(key=lambda x: x.__class__.__name__)
1414
# create template
1515
template_data = self._get_all('keys_and_queries', plugins) # get data from all plugins

mamonsu/lib/sender.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ def __init__(self):
1515
def _hash(self, key, host=None):
1616
return '{0}_+_{1}'.format(host, key)
1717

18-
def _key_from_hash(self, hash, host=None):
19-
result = hash.split('{0}_+_'.format(host))
18+
def _key_from_hash(self, hash_string, host=None):
19+
result = hash_string.split('{0}_+_'.format(host))
2020
if len(result) == 1:
21-
return hash
21+
return hash_string
2222
else:
2323
return result[1]
2424

mamonsu/lib/zbx_template.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ def turn_agent_type(self, xml):
117117
xml = re.sub(r"<type>2", "<type>0", xml)
118118
return xml
119119

120-
def xml(self, type, plugins=None):
120+
def xml(self, plg_type, plugins=None):
121121
# sort plugins!
122122
if plugins is None:
123123
plugins = []
124124
plugins.sort(key=lambda x: x.__class__.__name__)
125-
self.plg_type = type
125+
self.plg_type = plg_type
126126
# create template
127127
template_data = {'template': self.Template, 'application': self.Application}
128128
if Plugin.Type == 'agent':

0 commit comments

Comments
 (0)