Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
catalogue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
labs-team
catalogue
Commits
2cc0d882
Commit
2cc0d882
authored
6 years ago
by
gabriele-h
Browse files
Options
Downloads
Patches
Plain Diff
Rename MultiRecord to NotUnique, correct num_pages
parent
0eda5924
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sru/almasru.py
+4
-4
4 additions, 4 deletions
sru/almasru.py
with
4 additions
and
4 deletions
sru/almasru.py
+
4
−
4
View file @
2cc0d882
...
@@ -34,7 +34,7 @@ class NoRecord(SruException):
...
@@ -34,7 +34,7 @@ class NoRecord(SruException):
pass
pass
class
MultiRecord
(
SruException
):
class
NotUnique
(
SruException
):
pass
pass
...
@@ -112,7 +112,7 @@ class RecordRetriever:
...
@@ -112,7 +112,7 @@ class RecordRetriever:
self
.
_raise_error_no_match
(
num_recs
)
self
.
_raise_error_no_match
(
num_recs
)
self
.
_raise_error_sru
(
sru_xml
)
self
.
_raise_error_sru
(
sru_xml
)
num_pages
=
num_recs
//
10
num_pages
=
int
(
num_recs
.
text
)
//
10
xml_list
=
self
.
_extract_marc_xml
(
sru_xml
)
xml_list
=
self
.
_extract_marc_xml
(
sru_xml
)
...
@@ -148,7 +148,7 @@ class RecordRetriever:
...
@@ -148,7 +148,7 @@ class RecordRetriever:
if
(
num_recs
is
not
None
and
if
(
num_recs
is
not
None
and
num_recs
.
text
>
'
1
'
):
num_recs
.
text
>
'
1
'
):
raise
MultiRecord
(
'
More than one record found
'
raise
NotUnique
(
'
More than one record found
'
'
while exactly one was expected!
'
)
'
while exactly one was expected!
'
)
@staticmethod
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
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