Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.db.ldhf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.db.ldhf
Commits
aba9ab9f
Commit
aba9ab9f
authored
9 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Fixed method original_file_name
parent
9a16aa36
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
bob/db/cuhk_cufs/query.py
+12
-13
12 additions, 13 deletions
bob/db/cuhk_cufs/query.py
with
12 additions
and
13 deletions
bob/db/cuhk_cufs/query.py
+
12
−
13
View file @
aba9ab9f
...
@@ -57,12 +57,12 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
...
@@ -57,12 +57,12 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
file : :py:class:`File` or a derivative
file : :py:class:`File` or a derivative
The File objects for which the file name should be retrieved
The File objects for which the file name should be retrieved
check_existence : bool
check_existence : bool
Check if the original file exists?
Check if the original file exists?
IGNORED: ALWAYS CHECK
Return value : str
Return value : str
The original file name for the given File object
The original file name for the given File object
"""
"""
# check if directory is set
# check if directory is set
original_directory
=
self
.
original_directory
original_directory
=
self
.
original_directory
if
file
.
modality
==
"
photo
"
:
if
file
.
modality
==
"
photo
"
:
if
file
.
client
.
original_database
==
"
xm2vts
"
:
if
file
.
client
.
original_database
==
"
xm2vts
"
:
...
@@ -73,10 +73,9 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
...
@@ -73,10 +73,9 @@ class Database(bob.db.verification.utils.SQLiteDatabase, bob.db.verification.uti
if
not
original_directory
or
not
self
.
original_extension
:
if
not
original_directory
or
not
self
.
original_extension
:
raise
ValueError
(
"
The original_directory and/or the original_extension were not specified in the constructor.
"
)
raise
ValueError
(
"
The original_directory and/or the original_extension were not specified in the constructor.
"
)
# extract file name
# extract file name
#file_name = file.make_path(original_directory, self.original_extension)
file_name
=
""
file_name
=
""
if
check_existence
:
if
type
(
self
.
original_extension
)
is
list
:
if
type
(
self
.
original_extension
)
is
list
:
for
e
in
self
.
original_extension
:
for
e
in
self
.
original_extension
:
file_name
=
file
.
make_path
(
original_directory
,
e
)
file_name
=
file
.
make_path
(
original_directory
,
e
)
...
...
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