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

fix NoneType is not interable in case of no port mapping #4

Merged
merged 1 commit into from Aug 12, 2016

Conversation

chassing
Copy link
Contributor

in case a service doesn't use a port mapping (see compose.yml server db) port_mappings_from_container failed with "NoneType is not interable". container addresses is None instead of an empty list.

compose.yml:

version: '2'
services:
db:
image: postgres
web:
image: brogency/hello-world
ports:
- "8000"
depends_on:
- db

in case a service doesn't use a port mapping (see compose.yml server db) port_mappings_from_container failed with "NoneType is not interable". container addresses is None instead of an empty list.

compose.yml:

version: '2'
services:
  db:
    image: postgres
  web:
    image: brogency/hello-world
    ports:
      - "8000"
    depends_on:
      - db
@ShaneDrury
Copy link
Owner

@chassing Looks good and the fix works! Thank you.
Do you mind if I make a small formatting change to port_mappings_from_container and add a test for the behaviour you describe?
I can release a new version of this afterwards.

@ShaneDrury
Copy link
Owner

Actually, I can't push to your branch, so I'll merge this in and then merge the test/formatting fix.

@ShaneDrury
Copy link
Owner

👍

@ShaneDrury ShaneDrury merged commit fbefe33 into ShaneDrury:master Aug 12, 2016
@ShaneDrury
Copy link
Owner

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.

None yet

2 participants