-
Notifications
You must be signed in to change notification settings - Fork 70
Fail if unable to find artifact #556
Conversation
| artifact_paths.append(dir_child_path) | ||
| else: | ||
| raise NuleculeException("Unable to find artifact %s" % path) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so right now we only raise an exception if the file or dir doesn't exist. what happens if they pass us a directory but the directory is empty? Should that be an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dustymabe Updated to include this too :)
d587307 to
c058de0
Compare
|
PR updated to include if directory is empty. |
atomicapp/nulecule/base.py
Outdated
| continue | ||
| artifact_paths.append(dir_child_path) | ||
| elif os.listdir(path) == []: | ||
| raise NuleculeException("Artifact directory %s is empty" % path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is dead code. If it is a directory the it will pass the 2nd if and won't ever get to the 3rd one right?
c058de0 to
8df8b1c
Compare
|
Hey @dustymabe I updated it, don't know if it's to your satisfaction, hopefully it's better 👍 |
8df8b1c to
5f621d5
Compare
|
LGTM. rebase and merge please |
|
@cdrage ^^ |
5f621d5 to
0b9b580
Compare
|
Rebased and unit/integration tests pass. Mergin' |
Fail if unable to find artifact
2nd half of #532, raises NuleculeException if unable to find a file.
Another PR ahead for failing when using a wrong inherited provider, (ex. providing inherit: foobar).