summaryrefslogtreecommitdiff
path: root/setuptools/command/egg_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-17 12:09:26 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-05-17 12:09:26 -0400
commite800f237c57ef7fdeff281dd622a8876d96bee26 (patch)
treefe73a0222b5683365729fe83ac4bed58a664e626 /setuptools/command/egg_info.py
parent8bc0dda5a40bb5f270f0ca8c9d6e4cd7e1a8d71a (diff)
downloadpython-setuptools-bitbucket-e800f237c57ef7fdeff281dd622a8876d96bee26.tar.gz
with_statement is available naturally in Python 2.6
Diffstat (limited to 'setuptools/command/egg_info.py')
-rwxr-xr-xsetuptools/command/egg_info.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 33fe147e..22501c44 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -1,7 +1,6 @@
"""setuptools.command.egg_info
Create a distribution's .egg-info directory and contents"""
-from __future__ import with_statement
import os
import re
@@ -238,7 +237,7 @@ class FileList(_FileList):
#Must ensure utf-8 encodability
utf8_path = unicode_utils.try_encode(u_path, "utf-8")
- if utf8_path is None:
+ if utf8_path is None:
log.warn(enc_warn, path, 'utf-8')
return False
@@ -326,7 +325,7 @@ def write_file(filename, contents):
#assuming the contents has been vetted for utf-8 encoding
contents = contents.encode("utf-8")
-
+
with open(filename, "wb") as f: # always write POSIX-style manifest
f.write(contents)