Skip to content

Commit

Permalink
Chore: Satisfy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 15, 2023
1 parent 2171623 commit f794fd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cratedb_toolkit/io/mongodb/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def mongodb_copy(source_url, target_url, progress: bool = False):
mongodb_database = mongodb_collection_address.schema
mongodb_collection = mongodb_collection_address.table

# 0. Sanity checks.
if mongodb_database is None:
raise ValueError("MongoDB database not given or empty")

Check warning on line 37 in cratedb_toolkit/io/mongodb/api.py

View check run for this annotation

Codecov / codecov/patch

cratedb_toolkit/io/mongodb/api.py#L37

Added line #L37 was not covered by tests
if mongodb_collection is None:
raise ValueError("MongoDB collection not given or empty")

Check warning on line 39 in cratedb_toolkit/io/mongodb/api.py

View check run for this annotation

Codecov / codecov/patch

cratedb_toolkit/io/mongodb/api.py#L39

Added line #L39 was not covered by tests

# 1. Extract schema from MongoDB collection.
logger.info(f"Extracting schema from MongoDB: {mongodb_database}.{mongodb_collection}")
extract_args = argparse.Namespace(
Expand Down

0 comments on commit f794fd9

Please sign in to comment.