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

Chapter 7 Python dynamic inventory example needs two fixes for Python 3 #280

Closed
geerlingguy opened this issue Jun 3, 2020 · 2 comments
Closed

Comments

@geerlingguy
Copy link
Owner

This line is particularly incompatible with Python 3:

print json.dumps(self.inventory);

Not only is there a semicolon (egads!!!), it needs to use the new Python 3-style print statement:

print(json.dumps(self.inventory))
@geerlingguy
Copy link
Owner Author

Also set the hashbang to:

#!/usr/bin/env python3

@geerlingguy
Copy link
Owner Author

This will be in the next version of the book.

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

No branches or pull requests

1 participant