summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/install_egg_info.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/install_egg_info.py')
-rw-r--r--Lib/distutils/command/install_egg_info.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/distutils/command/install_egg_info.py b/Lib/distutils/command/install_egg_info.py
index c888031..c2a7d64 100644
--- a/Lib/distutils/command/install_egg_info.py
+++ b/Lib/distutils/command/install_egg_info.py
@@ -40,9 +40,8 @@ class install_egg_info(Command):
"Creating "+self.install_dir)
log.info("Writing %s", target)
if not self.dry_run:
- f = open(target, 'w')
- self.distribution.metadata.write_pkg_file(f)
- f.close()
+ with open(target, 'w', encoding='UTF-8') as f:
+ self.distribution.metadata.write_pkg_file(f)
def get_outputs(self):
return self.outputs