mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
update open calls to pass encoding (#684)
This commit is contained in:
@ -36,7 +36,9 @@ _prefix = "opentelemetry-instrumentation-"
|
||||
def main():
|
||||
root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
with open(
|
||||
os.path.join(root_path, _template_dir, _template_name), "r"
|
||||
os.path.join(root_path, _template_dir, _template_name),
|
||||
"r",
|
||||
encoding="utf-8",
|
||||
) as template:
|
||||
setuppy_tmpl = Template(template.read())
|
||||
base_instrumentation_path = os.path.join(root_path, "instrumentation")
|
||||
@ -69,7 +71,7 @@ def main():
|
||||
|
||||
generated_file = os.path.join(instrumentation_path, "setup.py")
|
||||
logger.info("generated %s", generated_file)
|
||||
with open(generated_file, "w") as fh:
|
||||
with open(generated_file, "w", encoding="utf-8") as fh:
|
||||
fh.write(generated)
|
||||
fh.flush()
|
||||
|
||||
|
Reference in New Issue
Block a user