return quote category even if =quote isnt present
This commit is contained in:
parent
b654660d96
commit
4c2c4a501c
1 changed files with 6 additions and 3 deletions
|
@ -5,9 +5,12 @@ from src import ModuleManager, utils
|
|||
|
||||
class Module(ModuleManager.BaseModule):
|
||||
def category_and_quote(self, s):
|
||||
if "=" in s:
|
||||
return [part.strip() for part in s.split("=", 1)]
|
||||
return None, None
|
||||
category, sep, quote = s.partition("=")
|
||||
category = category.strip()
|
||||
|
||||
if not sep:
|
||||
return category, None
|
||||
return category, quote.strip()
|
||||
|
||||
def _get_quotes(self, server, category):
|
||||
return server.get_setting("quotes-%s" % category, [])
|
||||
|
|
Loading…
Reference in a new issue