import pickle
import bunch
import yaml
-import ConfigParser
-import rados
+import configparser
from boto.s3.key import Key
from nose.plugins.attrib import attr
from nose.tools import eq_ as eq
+import rados
from .reqs import _make_admin_request
def __init__(self):
self.config = bunch.Bunch()
- cfg = ConfigParser.RawConfigParser()
+ cfg = configparser.RawConfigParser()
try:
path = os.environ['RAGWEED_CONF']
except KeyError:
for var in str_config_opts:
try:
cur[name][var] = cfg.get(section, var)
- except ConfigParser.NoOptionError:
+ except configparser.NoOptionError:
pass
for var in int_config_opts:
try:
cur[name][var] = cfg.getint(section, var)
- except ConfigParser.NoOptionError:
+ except configparser.NoOptionError:
pass
for var in bool_config_opts:
try:
cur[name][var] = cfg.getboolean(section, var)
- except ConfigParser.NoOptionError:
+ except configparser.NoOptionError:
pass
print(json.dumps(self.config))
import boto.s3.connection
-from httplib import HTTPConnection, HTTPSConnection
-from urlparse import urlparse
+from http.client import HTTPConnection, HTTPSConnection
+from urllib.parse import urlparse
import urllib
def _make_admin_request(conn, method, path, query_dict=None, body=None, response_headers=None, request_headers=None, expires_in=100000, path_style=True, timeout=None):
c = class_(host, port, strict=True, timeout=timeout)
# TODO: We might have to modify this in future if we need to interact with
- # how httplib.request handles Accept-Encoding and Host.
+ # how http.client.request handles Accept-Encoding and Host.
c.request(method, path, body=body, headers=request_headers)
res = c.getresponse()