diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-06-30 14:16:56 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-07-12 20:13:34 -0400 |
| commit | 61983b615b202bb95c21d7a5021af3373615e839 (patch) | |
| tree | 51c1774b6cf4d16c8f025bac66e52f29eaa6d852 /lib | |
| parent | 422e770eadd1805601861632845b3e63c66c5acc (diff) | |
add has_command()
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/elements/element.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py index 3c31f1b0..f0b7ea6f 100644 --- a/lib/elements/element.py +++ b/lib/elements/element.py @@ -215,6 +215,10 @@ class EmbroideryElement(object): 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) |
