add has_command()

pull/224/head
Lex Neva 2018-06-30 14:16:56 -04:00
rodzic 422e770ead
commit 61983b615b
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -214,6 +214,10 @@ class EmbroideryElement(object):
def get_commands(self, command):
return [c for c in self.commands if c.command == command]
@cache
def has_command(self, command):
return len(self.get_commands(command)) > 0
@cache
def get_command(self, command):
commands = self.get_commands(command)