mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-06 17:35:19 +00:00
fix error "has no len()"
This commit is contained in:
parent
9b106dcc7d
commit
4e895da471
@ -277,9 +277,10 @@ class SingleTextQueryBackend(RulenameCommentMixin, BaseBackend, QuoteCharMixin):
|
||||
|
||||
def generateSubexpressionNode(self, node):
|
||||
generated = self.generateNode(node.items)
|
||||
if len(node.items) == 1:
|
||||
# A sub expression with length 1 is not a proper sub expression, no self.subExpression required
|
||||
return generated
|
||||
if 'len'in dir(node.items): # fix the "TypeError: object of type 'NodeSubexpression' has no len()"
|
||||
if len(node.items) == 1:
|
||||
# A sub expression with length 1 is not a proper sub expression, no self.subExpression required
|
||||
return generated
|
||||
if generated:
|
||||
return self.subExpression % generated
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user