subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1742839 - /subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py
Date Sun, 08 May 2016 17:26:44 GMT
Author: stefan2
Date: Sun May  8 17:26:43 2016
New Revision: 1742839

URL: http://svn.apache.org/viewvc?rev=1742839&view=rev
Log:
Follow-up to r1742817:  Another fix to the serf tests. 

* subversion/tests/cmdline/mod_authz_svn_tests.py
  (verify_get): 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/mod_authz_svn_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py?rev=1742839&r1=1742838&r2=1742839&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/mod_authz_svn_tests.py Sun May  8 17:26:43 2016
@@ -101,11 +101,11 @@ def write_authz_file_groups(sbox):
 
 def verify_get(test_area_url, path, user, pw,
                expected_status, expected_body, headers):
-  if sys.version_info < (3, 0):
+  try:
     # Python <3.0
     import httplib
     from urlparse import urlparse
-  else:
+  except ImportError:
     # Python >=3.0
     import http.client
     from urllib.parse import urlparse



Mime
View raw message