summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/glusterfind/src/brickfind.py5
-rw-r--r--tools/glusterfind/src/changelog.py5
-rw-r--r--tools/glusterfind/src/conf.py5
-rw-r--r--tools/glusterfind/src/nodeagent.py5
4 files changed, 16 insertions, 4 deletions
diff --git a/tools/glusterfind/src/brickfind.py b/tools/glusterfind/src/brickfind.py
index e24fb1f0bdf..6bfb997f5a0 100644
--- a/tools/glusterfind/src/brickfind.py
+++ b/tools/glusterfind/src/brickfind.py
@@ -13,7 +13,10 @@ import os
import sys
import logging
from argparse import ArgumentParser, RawDescriptionHelpFormatter
-import urllib.request, urllib.parse, urllib.error
+try:
+ import urllib.parse as urllib
+except ImportError:
+ import urllib
import time
from utils import mkdirp, setup_logger, create_file, output_write, find
diff --git a/tools/glusterfind/src/changelog.py b/tools/glusterfind/src/changelog.py
index 608b5c7c2de..5897f790d4b 100644
--- a/tools/glusterfind/src/changelog.py
+++ b/tools/glusterfind/src/changelog.py
@@ -16,7 +16,10 @@ import xattr
import logging
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import hashlib
-import urllib.request, urllib.parse, urllib.error
+try:
+ import urllib.parse as urllib
+except ImportError:
+ import urllib
import codecs
import libgfchangelog
diff --git a/tools/glusterfind/src/conf.py b/tools/glusterfind/src/conf.py
index d91746bda13..fdab38badb1 100644
--- a/tools/glusterfind/src/conf.py
+++ b/tools/glusterfind/src/conf.py
@@ -9,7 +9,10 @@
# cases as published by the Free Software Foundation.
import os
-import ConfigParser
+try:
+ import configparser
+except ImportError:
+ import ConfigParser as configparser
config = ConfigParser.ConfigParser()
config.read(os.path.join(os.path.dirname(os.path.abspath(__file__)),
diff --git a/tools/glusterfind/src/nodeagent.py b/tools/glusterfind/src/nodeagent.py
index c337964c7db..4aed0e2ad96 100644
--- a/tools/glusterfind/src/nodeagent.py
+++ b/tools/glusterfind/src/nodeagent.py
@@ -14,7 +14,10 @@ import sys
import os
import logging
from argparse import ArgumentParser, RawDescriptionHelpFormatter
-import urllib.request, urllib.parse, urllib.error
+try:
+ import urllib.parse as urllib
+except ImportError:
+ import urllib
from errno import ENOTEMPTY
from utils import setup_logger, mkdirp, handle_rm_error