Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First lag on the way of eliminating os.system from dazel's code #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mishas
Copy link
Collaborator

@mishas mishas commented Oct 20, 2016

I've introduced docker-py into the code, and moved most of os.system(docker) calls to use that docker python api instead.

Next steps: Using docker-compose python api for the compose calls.

dazel.py Outdated
rc = 0
if rc:
return rc
if not self._pull and not self._image_exists():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant "self._pull()" right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

decode=True):
if "error" in line:
print("ERROR:", line["error"])
return False
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can only be one line of error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, yes.

Docs are not clear about it though :(


return rc
return 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not return True here to be consistent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause it's going to be returned from many other places, and I didn't want to refactor the whole code with that in mind. Its something we should do later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants