Ticket #10372: 10372.diff

File 10372.diff, 735 bytes (added by Matt Boersma, 15 years ago)
  • django/utils/version.py

     
    1919        path = django.__path__[0]
    2020    entries_path = '%s/.svn/entries' % path
    2121
    22     if os.path.exists(entries_path):
    23         entries = open(entries_path, 'r').read()
     22    try:
     23        if os.path.exists(entries_path):
     24            entries = open(entries_path, 'r').read()
     25    except IOError:
     26        pass
     27    else:
    2428        # Versions >= 7 of the entries file are flat text.  The first line is
    2529        # the version number. The next set of digits after 'dir' is the revision.
    2630        if re.match('(\d+)', entries):
Back to Top