mirror of
https://github.com/RPCSX/xed.git
synced 2026-01-31 01:05:17 +01:00
using is_stringish().
* bytes almost never come up except reading hash signature files. Change-Id: I04bcfe2af016e0f29fd76cafceda72f51b9abe18 (cherry picked from commit ef74f535c2f74f30ddd7a588486253bced2a3e32)
This commit is contained in:
@@ -148,7 +148,7 @@ class operand_info_t(object):
|
||||
if ( len(self.bits) == 1 and
|
||||
operand_info_t.decimal_number_pattern.match(self.bits[0]) ):
|
||||
return True
|
||||
elif type(self.bits) == bytes:
|
||||
elif genutil.is_stirngish(self.bits):
|
||||
if operand_info_t.decimal_number_pattern.match(self.bits):
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -548,7 +548,7 @@ class conditions_t(object):
|
||||
return False
|
||||
|
||||
def and_cond(self, c):
|
||||
if type(c) in [str,bytes]:
|
||||
if is_stringish(c):
|
||||
nc = condition_t(c)
|
||||
else:
|
||||
nc = c
|
||||
@@ -694,7 +694,7 @@ class rule_t(object):
|
||||
self.actions = []
|
||||
|
||||
for action in action_list:
|
||||
if type(action) in [str,bytes]:
|
||||
if is_stringish(action):
|
||||
self.actions.append(actions.action_t(action))
|
||||
else:
|
||||
self.actions.append(action)
|
||||
|
||||
Reference in New Issue
Block a user