Author: jacob
Date: 2009-04-03 15:29:59 -0500 (Fri, 03 Apr 2009)
New Revision: 10378

Modified:
   django/branches/releases/1.0.X/django/utils/version.py
Log:
[1.0.X] Fixed #10372: made `get_svn_revision()` more robust. Thanks, mboersma. 
Backport of r10377 from trunk.

Modified: django/branches/releases/1.0.X/django/utils/version.py
===================================================================
--- django/branches/releases/1.0.X/django/utils/version.py      2009-04-03 
20:28:23 UTC (rev 10377)
+++ django/branches/releases/1.0.X/django/utils/version.py      2009-04-03 
20:29:59 UTC (rev 10378)
@@ -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