summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-04-01 15:08:20 +0100
committerMark Haines <mark.haines@matrix.org>2016-04-01 15:08:20 +0100
commit9bc5b4c663ed4bb35ef74a820c108765c7ca0f67 (patch)
treedf19013c9f6088b5b676b74f813ba45da51a05f0 /synapse/storage
parentuse google style doc strings (diff)
downloadsynapse-9bc5b4c663ed4bb35ef74a820c108765c7ca0f67.tar.xz
Assert that the step != 0
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/util/id_generators.py1
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)