Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-vault
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-vault
Commits
6cb7a671
Commit
6cb7a671
authored
4 years ago
by
vlorentz
Browse files
Options
Downloads
Patches
Plain Diff
Move NotFoundExc from 'backend' to a new 'exc' module.
parent
4e19854e
No related branches found
Branches containing commit
Tags
v0.0.33
Tags containing commit
1 merge request
!55
Move NotFoundExc from 'backend' to a new 'exc' module.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
swh/vault/api/client.py
+1
-1
1 addition, 1 deletion
swh/vault/api/client.py
swh/vault/backend.py
+4
-8
4 additions, 8 deletions
swh/vault/backend.py
swh/vault/exc.py
+8
-0
8 additions, 0 deletions
swh/vault/exc.py
with
13 additions
and
9 deletions
swh/vault/api/client.py
+
1
−
1
View file @
6cb7a671
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
swh/vault/backend.py
+
4
−
8
View file @
6cb7a671
...
...
@@ -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
]
...
...
This diff is collapsed.
Click to expand it.
swh/vault/exc.py
0 → 100644
+
8
−
0
View file @
6cb7a671
# 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
This diff is collapsed.
Click to expand it.
Phabricator Migration user
@phabricator-migration
mentioned in merge request
!56 (closed)
·
2 years ago
mentioned in merge request
!56 (closed)
mentioned in merge request !56
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment