Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
class Alpr: Set self.loaded to False before exception
There are currently [46 open issues related to `loaded`](https://github.com/openalpr/openalpr/search?p=2&q=loaded&type=issues). Many of these [`AttributeError` issues](https://github.com/openalpr/openalpr/search?q=AttributeError&type=issues) are caused because `self.loaded` is only defined at the end of this method on (line 117). If an exception is raised (like line 62, etc.) then `self.loaded` is _never_ defined so subsequent code fails when trying to determine if `Alpr` has successfully loaded. Closes openalpr#311 Closes openalpr#414 Closes openalpr#426 Closes openalpr#461 Closes openalpr#508 Closes openalpr#533 Closes openalpr#660 Closes openalpr#732 Closes openalpr#738 Closes openalpr#764 Closes openalpr#806 Closes openalpr#837 Closes openalpr#913 Closes openalpr#916 Related to openalpr#555 Related to Homebrew/homebrew-core#89948
- Loading branch information