mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Some work about statistics plugin. It is almost finished (for a basic version)
This commit is contained in:
@@ -70,3 +70,11 @@ def decode(s, encodings=('ascii', 'utf8', 'latin1')):
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
return s.decode('ascii', 'ignore')
|
||||
|
||||
def getoption(name, default=None):
|
||||
res = None
|
||||
try:
|
||||
res = getattr(settings, name)
|
||||
except AttributeError:
|
||||
res = default
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user