Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 374b02e37439340fa9ae075b4ca32cfb13ce593c 1 parent ffe8994
Jacob Kaplan-Moss authored April 03, 2009

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/utils/version.py
5  django/utils/version.py
@@ -19,8 +19,11 @@ def get_svn_revision(path=None):
19 19
         path = django.__path__[0]
20 20
     entries_path = '%s/.svn/entries' % path
21 21
 
22  
-    if os.path.exists(entries_path):
  22
+    try:
23 23
         entries = open(entries_path, 'r').read()
  24
+    except IOError:
  25
+        pass
  26
+    else:
24 27
         # Versions >= 7 of the entries file are flat text.  The first line is
25 28
         # the version number. The next set of digits after 'dir' is the revision.
26 29
         if re.match('(\d+)', entries):

0 notes on commit 374b02e

Please sign in to comment.
Something went wrong with that request. Please try again.