diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-04-01 15:08:20 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-04-01 15:08:20 +0100 |
commit | 9bc5b4c663ed4bb35ef74a820c108765c7ca0f67 (patch) | |
tree | df19013c9f6088b5b676b74f813ba45da51a05f0 /synapse/storage/util | |
parent | use google style doc strings (diff) | |
download | synapse-9bc5b4c663ed4bb35ef74a820c108765c7ca0f67.tar.xz |
Assert that the step != 0
Diffstat (limited to 'synapse/storage/util')
-rw-r--r-- | synapse/storage/util/id_generators.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py index 58ea54cf67..f69f1cdad4 100644 --- a/synapse/storage/util/id_generators.py +++ b/synapse/storage/util/id_generators.py @@ -67,6 +67,7 @@ class StreamIdGenerator(object): # ... persist event ... """ def __init__(self, db_conn, table, column, extra_tables=[], step=1): + assert step != 0 self._lock = threading.Lock() self._step = step self._current = _load_current_id(db_conn, table, column, step) |