mirror of https://github.com/arendst/Tasmota.git
make regex more flexible for different quotation marks (#22629)
This commit is contained in:
parent
dc7cb05cab
commit
6268066bac
|
@ -53,7 +53,7 @@ def addEntryToModtab(source):
|
|||
is_module = False
|
||||
|
||||
|
||||
pattern = (r'''(?<=module\()[^"].*''') # module??
|
||||
pattern = (r'''(?<=module\([\"\']).*[\"\']''') # module??
|
||||
result = re.findall(pattern,code)
|
||||
if len(result) > 0:
|
||||
class_name = result[0].replace("'","").replace('"','').replace(")","")
|
||||
|
|
Loading…
Reference in New Issue