Skip to content

Commit

Permalink
Bug fix to handle shoulder string with dot
Browse files Browse the repository at this point in the history
current script failed on the following  shoulder.minter which contains
a dot in the  shoulder string 's6.caida':
'https://n2t.net/a/ezid/m/ark/d1986/s6.caida',
'https://n2t.net/a/ezid/m/ark/81986/s6.caida',

Use build-in function impl.nog.bdb.get_bdb_path_by_shoulder_model(shoulder_model) to handle this.
  • Loading branch information
jsjiang committed Nov 2, 2023
1 parent 13c238f commit 8cede5e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ def create_missing_minters(self):
unspecified_count += 1
continue

naan_str, shoulder_str = re.split(r'[/:.]', s.minter)[-2:]
# noinspection PyProtectedMember
bdb_path = impl.nog.bdb._get_bdb_path(naan_str, shoulder_str, root_path=None)
bdb_path = impl.nog.bdb.get_bdb_path_by_shoulder_model(s)
if pathlib.Path(bdb_path).exists():
continue

Expand Down

0 comments on commit 8cede5e

Please sign in to comment.