Skip to content

Commit

Permalink
update basestring -> string_types
Browse files Browse the repository at this point in the history
  • Loading branch information
terminalmage committed Mar 20, 2014
1 parent b1a1515 commit 5b8b036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/modules/pkg_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

# Import salt libs
import salt.utils
from salt._compat import string_types

log = logging.getLogger(__name__)
__SUFFIX_NOT_NEEDED = ('x86_64', 'noarch')
Expand Down Expand Up @@ -168,7 +169,7 @@ def pack_sources(sources):
salt '*' pkg_resource.pack_sources '[{"foo": "salt://foo.rpm"}, {"bar": "salt://bar.rpm"}]'
'''
_normalize_name = __salt__.get('pkg.normalize_name', lambda pkgname: pkgname)
if isinstance(sources, basestring):
if isinstance(sources, string_types):
try:
sources = yaml.safe_load(sources)
except yaml.parser.ParserError as err:
Expand Down

0 comments on commit 5b8b036

Please sign in to comment.