Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #10372: made `get_svn_revision()` more robust. Thanks, mboersma.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 374b02e37439340fa9ae075b4ca32cfb13ce593c 1 parent ffe8994
Jacob Kaplan-Moss jacobian authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/utils/
5 django/utils/
@@ -19,8 +19,11 @@ def get_svn_revision(path=None):
path = django.__path__[0]
entries_path = '%s/.svn/entries' % path
- if os.path.exists(entries_path):
+ try:
entries = open(entries_path, 'r').read()
+ except IOError:
+ pass
+ else:
# Versions >= 7 of the entries file are flat text. The first line is
# the version number. The next set of digits after 'dir' is the revision.
if re.match('(\d+)', entries):
Please sign in to comment.
Something went wrong with that request. Please try again.