Updated termcolor to v2.0. Bumped indicators to v2.1, closes #94

This commit is contained in:
Pranav Srinivas Kumar
2021-05-02 23:17:24 -05:00
parent 91ceb5c7cf
commit c338b5b280
5 changed files with 2211 additions and 207 deletions

View File

@@ -62,7 +62,7 @@ class Amalgamation(object):
return None
def __init__(self, args):
with open(args.config, 'r') as f:
with open(args.config, 'r', encoding="utf8") as f:
config = json.loads(f.read())
for key in config:
setattr(self, key, config[key])
@@ -77,7 +77,7 @@ class Amalgamation(object):
amalgamation = ""
if self.prologue:
with open(self.prologue, 'r') as f:
with open(self.prologue, 'r', encoding="utf8") as f:
amalgamation += datetime.datetime.now().strftime(f.read())
if self.verbose:
@@ -94,7 +94,7 @@ class Amalgamation(object):
t = TranslationUnit(file_path, self, True)
amalgamation += t.content
with open(self.target, 'w') as f:
with open(self.target, 'w', encoding="utf8") as f:
f.write(amalgamation)
print("...done!\n")
@@ -262,7 +262,7 @@ class TranslationUnit(object):
actual_path = self.amalgamation.actual_path(file_path)
if not os.path.isfile(actual_path):
raise IOError("File not found: \"{0}\"".format(file_path))
with open(actual_path, 'r') as f:
with open(actual_path, 'r', encoding="utf8") as f:
self.content = f.read()
self._process()