geändert: README.md
geändert: pyproject.toml geändert: src/jeb_utils/jeb_utils.py
This commit is contained in:
@@ -127,7 +127,7 @@ def mktopicpart(topic_name: str, partition_number: int):
|
||||
formatted_partition_number = f'{(int(partition_number)):02d}'
|
||||
with dbm.open(f'{DATA_DIR}/conf/topics', 'c') as db:
|
||||
if topic_name.encode() not in db.keys():
|
||||
raise exceptions.exceptions.TopicNotFoundError(f'topic \'{topic_name}\' does not exist')
|
||||
raise exceptions.TopicNotFoundError(f'topic \'{topic_name}\' does not exist')
|
||||
partitions = pickle.loads(db[topic_name.encode()])['partitions']
|
||||
if partition_number in partitions:
|
||||
raise exceptions.TopicPartitionExistsError(f'partition \'{formatted_partition_number}\' already exists for topic \'{topic_name}\'')
|
||||
|
||||
Reference in New Issue
Block a user