Skip to content

Commit

Permalink
read/write binary w/msgpack files
Browse files Browse the repository at this point in the history
Conflicts:
	salt/utils/minions.py
  • Loading branch information
UtahDave authored and basepi committed Feb 13, 2014
1 parent f151853 commit fd1b71a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions salt/utils/minions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _check_grain_minions(self, expr):
if not os.path.isfile(datap):
continue
grains = self.serial.load(
salt.utils.fopen(datap)
salt.utils.fopen(datap, 'rb')
).get('grains')
if not salt.utils.subdict_match(grains, expr):
minions.remove(id_)
Expand All @@ -135,7 +135,7 @@ def _check_grain_pcre_minions(self, expr):
if not os.path.isfile(datap):
continue
grains = self.serial.load(
salt.utils.fopen(datap)
salt.utils.fopen(datap, 'rb')
).get('grains')
if not salt.utils.subdict_match(grains, expr,
delim=':', regex_match=True):
Expand All @@ -160,7 +160,7 @@ def _check_pillar_minions(self, expr):
if not os.path.isfile(datap):
continue
pillar = self.serial.load(
salt.utils.fopen(datap)
salt.utils.fopen(datap, 'rb')
).get('pillar')
if not salt.utils.subdict_match(pillar, expr):
minions.remove(id_)
Expand All @@ -184,7 +184,7 @@ def _check_ipcidr_minions(self, expr):
if not os.path.isfile(datap):
continue
grains = self.serial.load(
salt.utils.fopen(datap)
salt.utils.fopen(datap, 'rb')
).get('grains')

num_parts = len(expr.split('/'))
Expand Down Expand Up @@ -233,7 +233,7 @@ def _check_range_minions(self, expr):
if not os.path.isfile(datap):
continue
grains = self.serial.load(
salt.utils.fopen(datap)
salt.utils.fopen(datap, 'rb')
).get('grains')

range_ = seco.range.Range(self.opts['range_server'])
Expand Down

0 comments on commit fd1b71a

Please sign in to comment.