Skip to content
Snippets Groups Projects
Commit 6cb7a671 authored by vlorentz's avatar vlorentz
Browse files

Move NotFoundExc from 'backend' to a new 'exc' module.

parent 4e19854e
No related branches found
Tags v0.0.33
1 merge request!55Move NotFoundExc from 'backend' to a new 'exc' module.
......@@ -6,7 +6,7 @@
from swh.model import hashutil
from swh.core.api import RPCClient
from swh.vault.backend import NotFoundExc
from swh.vault.exc import NotFoundExc
class RemoteVaultClient(RPCClient):
......
......@@ -4,16 +4,18 @@
# See top-level LICENSE file for more information
import smtplib
from email.mime.text import MIMEText
import psycopg2.extras
import psycopg2.pool
from email.mime.text import MIMEText
from swh.core.db import BaseDb
from swh.core.db.common import db_transaction
from swh.model import hashutil
from swh.scheduler.utils import create_oneshot_task_dict
from swh.vault.cookers import get_cooker_cls
from swh.vault.exc import NotFoundExc
cooking_task_name = "swh.vault.cooking_tasks.SWHCookingTask"
......@@ -57,12 +59,6 @@ The Software Heritage Developers
"""
class NotFoundExc(Exception):
"""Bundle was not found."""
pass
def batch_to_bytes(batch):
return [(obj_type, hashutil.hash_to_bytes(obj_id)) for obj_type, obj_id in batch]
......
# Copyright (C) 2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
class NotFoundExc(Exception):
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment