Index: checkout.py |
diff --git a/checkout.py b/checkout.py |
index bed4737507250693f074cda16583649574eb5119..8f7c4be2baa44bdaf5c739c891b308ad7ad871ec 100644 |
--- a/checkout.py |
+++ b/checkout.py |
@@ -7,7 +7,6 @@ |
Includes support for svn, git-svn and git. |
""" |
-import ConfigParser |
import fnmatch |
import logging |
import os |
@@ -17,6 +16,12 @@ import subprocess |
import sys |
import tempfile |
+# The configparser module was renamed in Python 3. |
nodir
2016/06/16 18:55:58
this comment should be inside except clause
vapier
2016/06/16 19:13:47
"configparser" is the py3 name which is in the try
|
+try: |
+ import configparser |
+except ImportError: |
+ import ConfigParser as configparser |
+ |
import patch |
import scm |
import subprocess2 |
@@ -258,7 +263,7 @@ class SvnConfig(object): |
self.svn_config_dir = os.path.expanduser( |
os.path.join('~', '.subversion')) |
svn_config_file = os.path.join(self.svn_config_dir, 'config') |
- parser = ConfigParser.SafeConfigParser() |
+ parser = configparser.SafeConfigParser() |
if os.path.isfile(svn_config_file): |
parser.read(svn_config_file) |
else: |