~mfisch/ubuntu/saucy/distribute/update-to-0.6.37-1

« back to all changes in this revision

Viewing changes to distribute_setup.py

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2013-01-15 21:13:37 UTC
  • mto: (9.1.6 experimental) (1.1.8)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: package-import@ubuntu.com-20130115211337-n6rcw9p4bsu2tdn7
Tags: upstream-0.6.34
ImportĀ upstreamĀ versionĀ 0.6.34

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
            args = [quote(arg) for arg in args]
50
50
        return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
51
51
 
52
 
DEFAULT_VERSION = "0.6.30"
 
52
DEFAULT_VERSION = "0.6.34"
53
53
DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
54
54
SETUPTOOLS_FAKED_VERSION = "0.6c11"
55
55
 
239
239
 
240
240
def _patch_file(path, content):
241
241
    """Will backup the file then patch it"""
242
 
    existing_content = open(path).read()
 
242
    f = open(path)
 
243
    existing_content = f.read()
 
244
    f.close()
243
245
    if existing_content == content:
244
246
        # already patched
245
247
        log.warn('Already patched.')
257
259
 
258
260
 
259
261
def _same_content(path, content):
260
 
    return open(path).read() == content
 
262
    f = open(path)
 
263
    existing_content = f.read()
 
264
    f.close()
 
265
    return existing_content == content
261
266
 
262
267
 
263
268
def _rename_path(path):