Ticket #9262: 9107.patch

File 9107.patch, 628 bytes (added by semenov, 6 years ago)
  • django/utils/version.py

     
    2020    entries_path = '%s/.svn/entries' % path
    2121
    2222    if os.path.exists(entries_path):
    23         entries = open(entries_path, 'r').read()
     23        f = open(entries_path, 'r')
     24        entries = f.read()
     25        f.close()
     26
    2427        # Versions >= 7 of the entries file are flat text.  The first line is
    2528        # the version number. The next set of digits after 'dir' is the revision.
    2629        if re.match('(\d+)', entries):
Back to Top