Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-spencer committed Jun 7, 2019
1 parent d95939c commit 142fa79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metsrw/fsentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class FSEntry(DependencyPossessor):
def __init__(
self,
path=None,
fileid=None,
label=None,
use="original",
type=u"Item",
Expand All @@ -138,6 +139,7 @@ def __init__(
self.path = path
if label is None and path is not None:
label = os.path.basename(path)
self.fileid = fileid
self.label = label
self.use = use
self.type = six.text_type(type)
Expand Down Expand Up @@ -204,6 +206,8 @@ def file_id(self):
"No FILEID: File %s does not have file_uuid set" % self.path
)
if self.is_aip:
if self.fileid:
return self.fileid
return os.path.splitext(os.path.basename(self.path))[0]
return utils.FILE_ID_PREFIX + self.file_uuid

Expand Down

0 comments on commit 142fa79

Please sign in to comment.