Skip to content
This repository was archived by the owner on Jan 19, 2018. It is now read-only.

Conversation

@cdrage
Copy link
Member

@cdrage cdrage commented Feb 12, 2016

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).

artifact_paths.append(dir_child_path)
else:
raise NuleculeException("Unable to find artifact %s" % path)

Copy link
Contributor

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?

Copy link
Member Author

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 :)

@cdrage cdrage force-pushed the fail-if-file-not-found branch from d587307 to c058de0 Compare February 16, 2016 14:58
@cdrage
Copy link
Member Author

cdrage commented Feb 16, 2016

PR updated to include if directory is empty.

continue
artifact_paths.append(dir_child_path)
elif os.listdir(path) == []:
raise NuleculeException("Artifact directory %s is empty" % path)
Copy link
Contributor

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?

@cdrage cdrage force-pushed the fail-if-file-not-found branch from c058de0 to 8df8b1c Compare February 18, 2016 16:21
@cdrage
Copy link
Member Author

cdrage commented Feb 18, 2016

Hey @dustymabe I updated it, don't know if it's to your satisfaction, hopefully it's better 👍

@cdrage cdrage force-pushed the fail-if-file-not-found branch from 8df8b1c to 5f621d5 Compare February 18, 2016 16:23
@dustymabe
Copy link
Contributor

LGTM. rebase and merge please

@dustymabe
Copy link
Contributor

@cdrage ^^

@cdrage cdrage force-pushed the fail-if-file-not-found branch from 5f621d5 to 0b9b580 Compare February 22, 2016 16:50
@cdrage
Copy link
Member Author

cdrage commented Feb 22, 2016

Rebased and unit/integration tests pass. Mergin'

cdrage added a commit that referenced this pull request Feb 22, 2016
@cdrage cdrage merged commit f6ffde1 into projectatomic:master Feb 22, 2016
@cdrage cdrage deleted the fail-if-file-not-found branch February 22, 2016 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants