Author: jacob
Date: 2009-04-03 15:28:23 -0500 (Fri, 03 Apr 2009)
New Revision: 10377

Modified:
   django/trunk/django/utils/version.py
Log:
Fixed #10372: made `get_svn_revision()` more robust. Thanks, mboersma.

Modified: django/trunk/django/utils/version.py
===================================================================
--- django/trunk/django/utils/version.py        2009-04-03 20:04:39 UTC (rev 
10376)
+++ django/trunk/django/utils/version.py        2009-04-03 20:28:23 UTC (rev 
10377)
@@ -19,8 +19,11 @@
         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):


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to