Without this commit, the objectpath would print into everything if it couldn't import the pytz.
Now, it will only complain if the stdin is not a file and the stdout is a tty - so you will get an error if you open up the interactive interpreter, or when you run a script as ./script.py, but not if you echo "string" | ./script.py or ./script.py | egrep -e "regex".
The earlier pull was mistakenly about two commits instead of only this one - the other one is in another pull request already.
Without this commit, the objectpath would print into everything if it couldn't import the pytz. Now, it will only complain if the stdin is not a file and the stdout is a tty - so you will get an error if you open up the interactive interpreter, or when you run a script as ./script.py, but not if you echo "string" | ./script.py or ./script.py | egrep -e "regex". The earlier pull was mistakenly about two commits instead of only this one - the other one is in another pull request already.