verigak / progress

Easy to use progress bars for Python
ISC License
1.41k stars 179 forks source link

changes to handle self.file is none case #47

Closed shivareddyiirs closed 6 years ago

shivareddyiirs commented 6 years ago

here when self.file is none , none type object would not have isatty(). Hence modified code so that program don't check isatty when it is none.

verigak commented 6 years ago

How is:

    if self.file:
        if self.file.isatty():

different than if self.file and self.file.isatty(): ?

shivareddyiirs commented 6 years ago

update to handle isatty not in self.file

verigak commented 6 years ago

Can you explain what you are trying to do? The case where self.file is None should already be covered by commit a83f91f4b82c5ad65a0de9d3fb24fef8afaa1dea. What is this pull request trying to solve?

shivareddyiirs commented 6 years ago

@verigak it checks if 'isatty' is defined in the object refere issue: #46

verigak commented 6 years ago

This is handled better now, as mentioned in #50.