◐ Shell
clean mode source ↗

fix: replace deprecated codecs.open with built-in open (#128) by mvanhorn · Pull Request #134 · gitpython-developers/gitdb

Expand Up @@ -2,7 +2,6 @@ # # This module is part of GitDB and is released under # the New BSD License: https://opensource.org/license/bsd-3-clause/ import codecs from gitdb.db.base import ( CompoundDB, ) Expand Down Expand Up @@ -42,7 +41,7 @@ def _update_dbs_from_ref_file(self): # try to get as many as possible, don't fail if some are unavailable ref_paths = list() try: with codecs.open(self._ref_file, 'r', encoding="utf-8") as f: with open(self._ref_file, 'r', encoding="utf-8") as f: ref_paths = [l.strip() for l in f] except OSError: pass Expand Down