Also removes urlgrabber.grabber.reset_curl_obj() from getDefaultHostname()
where all its job were to cause races occasionally.
---
pyanaconda/isys/isys.c | 14 --------------
pyanaconda/network.py | 5 -----
pyanaconda/textw/netconfig_text.py | 1 -
3 files changed, 20 deletions(-)
diff --git a/pyanaconda/isys/isys.c b/pyanaconda/isys/isys.c
index d2411f5..c3f2183 100644
--- a/pyanaconda/isys/isys.c
+++ b/pyanaconda/isys/isys.c
@@ -91,7 +91,6 @@ static PyObject * doSwapoff(PyObject * s, PyObject * args);
static PyObject * doWipeRaidSuperblock(PyObject * s, PyObject * args);
static PyObject * doGetRaidChunkSize(PyObject * s, PyObject * args);
static PyObject * doDevSpaceFree(PyObject * s, PyObject * args);
-static PyObject * doResetResolv(PyObject * s, PyObject * args);
static PyObject * doExt2Dirty(PyObject * s, PyObject * args);
static PyObject * doExt2HasJournal(PyObject * s, PyObject * args);
static PyObject * doEjectCdrom(PyObject * s, PyObject * args);
@@ -120,7 +119,6 @@ static PyMethodDef isysModuleMethods[] = {
{ "getraidchunk", (PyCFunction) doGetRaidChunkSize, METH_VARARGS, NULL },
{ "mount", (PyCFunction) doMount, METH_VARARGS, NULL },
{ "umount", (PyCFunction) doUMount, METH_VARARGS, NULL },
- { "resetresolv", (PyCFunction) doResetResolv, METH_VARARGS, NULL },
{ "swapon", (PyCFunction) doSwapon, METH_VARARGS, NULL },
{ "swapoff", (PyCFunction) doSwapoff, METH_VARARGS, NULL },
{ "isPseudoTTY", (PyCFunction) doisPseudoTTY, METH_VARARGS, NULL},
@@ -275,18 +273,6 @@ static PyObject * doPrefixToNetmask (PyObject * s, PyObject * args)
{
return Py_BuildValue("s", dst);
}
-static PyObject * doResetResolv(PyObject * s, PyObject * args) {
- if (!PyArg_ParseTuple(args, "")) {
- return NULL;
- }
-
- /* reinit the resolver so DNS changes take affect */
- res_init();
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
static PyObject * doWipeRaidSuperblock(PyObject * s, PyObject * args) {
int fd;
unsigned long size;
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 640cd70..d626ea1 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -115,7 +115,6 @@ def getFirstRealIP():
# Try to determine what the hostname should be for this system
def getHostname():
- resetResolver()
hn = None
@@ -700,10 +699,6 @@ def ifaceForHostIP(host):
return routeInfo[routeInfo.index("dev") + 1]
-def resetResolver():
- isys.resetResolv()
- urlgrabber.grabber.reset_curl_obj()
-
def setHostname(hn):
if flags.imageInstall:
log.info("image install -- not setting hostname")
diff --git a/pyanaconda/textw/netconfig_text.py b/pyanaconda/textw/netconfig_text.py
index 47db652..daa7329 100644
--- a/pyanaconda/textw/netconfig_text.py
+++ b/pyanaconda/textw/netconfig_text.py
@@ -406,7 +406,6 @@ class NetworkConfiguratorText:
dev.writeIfcfgFile()
return False
- network.resetResolver()
return True
def _ipv4MethodToggled(self, *args):
--
1.7.11.7