diff options
author | Erik Johnston <erikj@jki.re> | 2016-11-12 11:20:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-12 11:20:46 +0000 |
commit | 0964005d849de699d49e02c4ad5aa6fa8069ba01 (patch) | |
tree | 4add6086e19dc2ee96a9080c6520f2cfd3de9853 /synapse/config | |
parent | Merge pull request #1619 from matrix-org/erikj/pwd_provider_error (diff) | |
parent | Add support for durations in minutes (diff) | |
download | synapse-0964005d849de699d49e02c4ad5aa6fa8069ba01.tar.xz |
Merge pull request #1625 from DanielDent/patch-1
Add support for durations in minutes
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/_base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py index af9f17bf7b..1ab5593c6e 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -64,11 +64,12 @@ class Config(object): if isinstance(value, int) or isinstance(value, long): return value second = 1000 - hour = 60 * 60 * second + minute = 60 * second + hour = 60 * minute day = 24 * hour week = 7 * day year = 365 * day - sizes = {"s": second, "h": hour, "d": day, "w": week, "y": year} + sizes = {"s": second, "m": minute, "h": hour, "d": day, "w": week, "y": year} size = 1 suffix = value[-1] if suffix in sizes: |