Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.bio.vein
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.bio.vein
Commits
732e42f9
Commit
732e42f9
authored
Oct 05, 2017
by
André Anjos
💬
Committed by
André Anjos
Oct 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use simpler validation
parent
fe2f04c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
bob/bio/vein/script/view_sample.py
bob/bio/vein/script/view_sample.py
+4
-4
No files found.
bob/bio/vein/script/view_sample.py
View file @
732e42f9
...
...
@@ -180,8 +180,11 @@ def validate(args):
'''
valid_databases
=
(
'fv3d'
,
'verafinger'
)
sch
=
schema
.
Schema
({
'<database>'
:
lambda
n
:
n
in
(
'fv3d'
,
'verafinger'
),
'<database>'
:
schema
.
And
(
lambda
n
:
n
in
valid_databases
,
error
=
'<database> must be one of %s'
%
', '
.
join
(
valid_databases
)),
str
:
object
,
#ignores strings we don't care about
},
ignore_extra_keys
=
True
)
...
...
@@ -219,9 +222,6 @@ def main(user_input=None):
from
..configurations.fv3d
import
database
as
db
elif
args
[
'<database>'
]
==
'verafinger'
:
from
..configurations.verafinger
import
database
as
db
else
:
raise
schema
.
SchemaError
(
'Database %s is not supported'
%
\
args
[
'<database>'
])
database_replacement
=
"%s/.bob_bio_databases.txt"
%
os
.
environ
[
"HOME"
]
db
.
replace_directories
(
database_replacement
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment