diff options
-rw-r--r-- | ranger/container/tags.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ranger/container/tags.py b/ranger/container/tags.py index ed5b876a..50d5ff72 100644 --- a/ranger/container/tags.py +++ b/ranger/container/tags.py @@ -29,10 +29,7 @@ class Tags(object): return item in self.tags def add(self, *items, **others): - if 'tag' in others: - tag = others['tag'] - else: - tag = self.default_tag + tag = others.get('tag', self.default_tag) self.sync() for item in items: self.tags[item] = tag @@ -48,10 +45,7 @@ class Tags(object): self.dump() def toggle(self, *items, **others): - if 'tag' in others: - tag = others['tag'] - else: - tag = self.default_tag + tag = others.get('tag', self.default_tag) tag = str(tag) if tag not in ALLOWED_KEYS: return |