Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/backfill.py
Show First 20 Lines • Show All 573 Lines • ▼ Show 20 Lines | def parse_arguments(self, object_type, start_object, end_object): | ||||
Returns: | Returns: | ||||
Parsed start and end object ids | Parsed start and end object ids | ||||
""" | """ | ||||
if object_type not in COLUMNS: | if object_type not in COLUMNS: | ||||
raise ValueError( | raise ValueError( | ||||
"Object type %s is not supported. " | "Object type %s is not supported. " | ||||
"The only possible values are %s" | "The only possible values are %s" | ||||
% (object_type, ", ".join(COLUMNS.keys())) | % (object_type, ", ".join(sorted(COLUMNS.keys()))) | ||||
) | ) | ||||
if object_type in ["origin", "origin_visit", "origin_visit_status"]: | if object_type in ["origin", "origin_visit", "origin_visit_status"]: | ||||
if start_object: | if start_object: | ||||
start_object = int(start_object) | start_object = int(start_object) | ||||
else: | else: | ||||
start_object = 0 | start_object = 0 | ||||
if end_object: | if end_object: | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |