subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1742830 - /subversion/trunk/subversion/tests/cmdline/lock_tests.py
Date Sun, 08 May 2016 14:50:59 GMT
Author: stefan2
Date: Sun May  8 14:50:59 2016
New Revision: 1742830

URL: http://svn.apache.org/viewvc?rev=1742830&view=rev
Log:
Follow-up to r1742817:  Fix serf tests.

* subversion/tests/cmdline/lock_tests.py
  (dav_lock_refresh): We don't have the sys module loaded here; so use the
                      pythonic try/except block to handle version specifics.

Modified:
    subversion/trunk/subversion/tests/cmdline/lock_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1742830&r1=1742829&r2=1742830&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Sun May  8 14:50:59 2016
@@ -2216,10 +2216,10 @@ def many_locks_hooks(sbox):
 def dav_lock_refresh(sbox):
   "refresh timeout of DAV lock"
 
-  if sys.version_info < (3, 0):
+  try:
     # Python <3.0
     import httplib
-  else:
+  except ImportError:
     # Python >=3.0
     import http.client
 



Mime
View raw message