Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/+add-pulp-exceptions.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add more Pulp Exceptions.
Empty file added pulp_npm/app/exceptions.py
Empty file.
3 changes: 2 additions & 1 deletion pulp_npm/app/tasks/synchronizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
from gettext import gettext as _

from pulpcore.plugin.exceptions import SyncError
from pulpcore.plugin.models import Artifact, Remote, Repository
from pulpcore.plugin.serializers import RepositoryVersionSerializer
from pulpcore.plugin.stages import (
Expand Down Expand Up @@ -35,7 +36,7 @@ def synchronize(remote_pk, repository_pk, mirror=False):
repository = Repository.objects.get(pk=repository_pk)

if not remote.url:
raise ValueError(_("A remote must have a url specified to synchronize."))
raise SyncError(_("A remote must have a url specified to synchronize."))

# Interpret policy to download Artifacts or not
deferred_download = remote.policy != Remote.IMMEDIATE
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers=[
]
requires-python = ">=3.11"
dependencies = [
"pulpcore>=3.85.0,<3.115",
"pulpcore>=3.105.0,<3.115",
Comment thread
jobselko marked this conversation as resolved.
]

[project.urls]
Expand Down
Loading