Commit 3d6068d5 authored by Jason R. Coombs's avatar Jason R. Coombs

with_statement is available naturally in Python 2.6

parent f03d098e
[ssl:sys_platform=='win32']
wincertstore==0.2
[certs] [certs]
certifi==1.0.1 certifi==1.0.1
\ No newline at end of file
[ssl:sys_platform=='win32']
wincertstore==0.2
\ No newline at end of file
"""setuptools.command.egg_info """setuptools.command.egg_info
Create a distribution's .egg-info directory and contents""" Create a distribution's .egg-info directory and contents"""
from __future__ import with_statement
import os import os
import re import re
...@@ -238,7 +237,7 @@ class FileList(_FileList): ...@@ -238,7 +237,7 @@ class FileList(_FileList):
#Must ensure utf-8 encodability #Must ensure utf-8 encodability
utf8_path = unicode_utils.try_encode(u_path, "utf-8") 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') log.warn(enc_warn, path, 'utf-8')
return False return False
...@@ -326,7 +325,7 @@ def write_file(filename, contents): ...@@ -326,7 +325,7 @@ def write_file(filename, contents):
#assuming the contents has been vetted for utf-8 encoding #assuming the contents has been vetted for utf-8 encoding
contents = contents.encode("utf-8") contents = contents.encode("utf-8")
with open(filename, "wb") as f: # always write POSIX-style manifest with open(filename, "wb") as f: # always write POSIX-style manifest
f.write(contents) f.write(contents)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment