Skip to content

Commit

Permalink
Merge pull request #178 from jthure/issue#155 closes #155
Browse files Browse the repository at this point in the history
Python2 code in toolbox.msp, issue#155
  • Loading branch information
jakinyele committed Apr 12, 2018
2 parents 17827a9 + 79284ea commit b83e7ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charm/toolbox/msp.py
Expand Up @@ -25,9 +25,9 @@ def createPolicy(self, policy_string):
Convert a Boolean formula represented as a string into a policy represented like a tree.
"""

assert type(policy_string) in [str, unicode], "invalid type for policy_string"
if(type(policy_string) == str):
policy_string = unicode(policy_string)
assert type(policy_string) in [bytes, str], "invalid type for policy_string"
if type(policy_string) == bytes:
policy_string = policy_string.decode('utf-8')
parser = PolicyParser()
policy_obj = parser.parse(policy_string)
_dictCount, _dictLabel = {}, {}
Expand Down

0 comments on commit b83e7ed

Please sign in to comment.