replace 129 lines of code with 18

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all:

With the objective of making the anaconda code more readable and
smaller, I have conjured up a patch that takes away all those
"import logging" lines from the code. Since that is a module that is used a lot I simply put it in the __builtin__ as log and
stdoutlog.
It works nicely on my test machine.
Comments would be appreciated!!!

Regards.

PD:  This patch would be accompanied with some wiki documentation
that helps to understand the log stuff.


--
Joel Andres Granados
Red Hat / Brno, Czech Republic
diff --git a/anaconda b/anaconda
index 48a4b02..c4d0a42 100755
--- a/anaconda
+++ b/anaconda
@@ -526,12 +526,8 @@ if __name__ == "__main__":
         pass
 
     # Set up logging as early as possible.
-    import logging
     from anaconda_log import logger, logLevelMap
 
-    log = logging.getLogger("anaconda")
-    stdoutLog = logging.getLogger("anaconda.stdout")
-
     # pull this in to get product name and versioning
     import product
 
diff --git a/anaconda_log.py b/anaconda_log.py
index abdbcc2..79ddaa9 100644
--- a/anaconda_log.py
+++ b/anaconda_log.py
@@ -17,6 +17,7 @@
 #
 
 import sys
+import __builtin__
 import logging
 from logging.handlers import SysLogHandler, SYSLOG_UDP_PORT
 
@@ -64,6 +65,11 @@ class AnacondaLog:
         self.addFileHandler (sys.stdout, self.stdoutLogger,
                              fmtStr="%(asctime)s %(message)s", minLevel=logging.INFO)
 
+
+        # Lets add the logs to builtins so we dont have to call it in every file.
+        __builtin__.log = self.logger
+        __builtin__.stdoutlog = self.stdoutLogger
+
     # Add a simple handler - file or stream, depending on what we're given.
     def addFileHandler (self, file, addToLogger, minLevel=DEFAULT_LEVEL,
                         fmtStr="%(asctime)s %(levelname)-8s: %(message)s",
diff --git a/autopart.py b/autopart.py
index 13d2303..a998533 100644
--- a/autopart.py
+++ b/autopart.py
@@ -29,8 +29,6 @@ from partErrors import *
 
 from rhpl.translate import _, N_
 
-log = logging.getLogger("anaconda")
-
 PARTITION_FAIL = -1
 PARTITION_SUCCESS = 0
 
diff --git a/backend.py b/backend.py
index 9ec560b..ecef37b 100644
--- a/backend.py
+++ b/backend.py
@@ -27,8 +27,6 @@ import packages
 from rhpl.translate import _
 
 from flags import flags
-log = logging.getLogger("anaconda")
-
 
 class AnacondaBackend:
     def __init__(self, method, instPath):
diff --git a/bootloader.py b/bootloader.py
index e7d8465..2c21b47 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -25,9 +25,6 @@ from constants import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
-
 import booty
 import bootloaderInfo
 from fsset import *
diff --git a/cmdline.py b/cmdline.py
index c343eb9..2a3093e 100644
--- a/cmdline.py
+++ b/cmdline.py
@@ -21,8 +21,6 @@ from flags import flags
 
 from rhpl.translate import _, cat, N_
 
-import logging
-log = logging.getLogger("anaconda")
 
 stepToClasses = { "install" : "setupProgressDisplay" }
 
diff --git a/desktop.py b/desktop.py
index cc884a5..439a4b6 100644
--- a/desktop.py
+++ b/desktop.py
@@ -17,8 +17,6 @@ import string
 
 from rhpl.simpleconfig import SimpleConfigFile
 
-import logging
-log = logging.getLogger("anaconda")
 
 class Desktop (SimpleConfigFile):
 #
diff --git a/dispatch.py b/dispatch.py
index ea0d2fb..8b5394f 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -43,8 +43,6 @@ from backend import doPostSelection, doRepoSetup, doBasePackageSelect
 from backend import doPreInstall, doPostInstall, doInstall
 from backend import writeConfiguration
 
-import logging
-log = logging.getLogger("anaconda")
 
 # These are all of the install steps, in order. Note that upgrade and
 # install steps are the same thing! Upgrades skip install steps, while
diff --git a/dmraid.py b/dmraid.py
index 82f5f8e..86d8007 100644
--- a/dmraid.py
+++ b/dmraid.py
@@ -36,7 +36,6 @@ import logging
 from anaconda_log import logger, logFile
 
 logger.addLogger ("anaconda.dmraid", minLevel=logging.DEBUG)
-log = logging.getLogger("anaconda.dmraid")
 logger.addFileHandler (logFile, log)
 
 import isys
diff --git a/exception.py b/exception.py
index 06bdcf4..00bff62 100644
--- a/exception.py
+++ b/exception.py
@@ -32,8 +32,6 @@ from rhpl.translate import _
 from flags import flags
 import kickstart
 
-import logging
-log = logging.getLogger("anaconda")
 
 dumpHash = {}
 
diff --git a/firewall.py b/firewall.py
index 71f2b83..462ee5a 100644
--- a/firewall.py
+++ b/firewall.py
@@ -19,8 +19,6 @@ from flags import flags
 
 from rhpl.translate import _, N_
 
-import logging
-log = logging.getLogger("anaconda")
 
 class Firewall:
     def __init__ (self):
diff --git a/fsset.py b/fsset.py
index 61ba6a0..1918516 100644
--- a/fsset.py
+++ b/fsset.py
@@ -34,8 +34,6 @@ from flags import flags
 import rhpl
 from rhpl.translate import _, N_
 
-import logging
-log = logging.getLogger("anaconda")
 
 class SuspendError(Exception):
     pass
diff --git a/gui.py b/gui.py
index b8ebb63..e034583 100755
--- a/gui.py
+++ b/gui.py
@@ -43,9 +43,6 @@ from rhpl.translate import _, N_
 
 from release_notes import *
 
-import logging
-log = logging.getLogger("anaconda")
-
 isys.bind_textdomain_codeset("redhat-dist", "UTF-8")
 
 class StayOnScreen(Exception):
diff --git a/harddrive.py b/harddrive.py
index ff9bf9d..2c0893e 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -20,8 +20,6 @@ import string
 from rhpl.translate import _, cat, N_
 from constants import *
 
-import logging
-log = logging.getLogger("anaconda")
 
 # Install from one or more iso images
 class HardDriveInstallMethod(ImageInstallMethod):
diff --git a/image.py b/image.py
index 74b3461..1941454 100644
--- a/image.py
+++ b/image.py
@@ -29,8 +29,6 @@ from constants import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 # this sucks, but we want to consider s390x as s390x in here but generally
 # don't.  *sigh*
diff --git a/installclass.py b/installclass.py
index d2229e3..5d3d9c3 100644
--- a/installclass.py
+++ b/installclass.py
@@ -27,8 +27,6 @@ from autopart import getAutopartitionBoot, autoCreatePartitionRequests, autoCrea
 
 from rhpl.translate import _, N_
 
-import logging
-log = logging.getLogger("anaconda")
 
 from flags import flags
 from constants import *
diff --git a/installclasses/rhel.py b/installclasses/rhel.py
index b6e8cda..473858a 100644
--- a/installclasses/rhel.py
+++ b/installclasses/rhel.py
@@ -12,8 +12,6 @@ try:
 except ImportError:
     instnum = None
 
-import logging
-log = logging.getLogger("anaconda")
 
 # custom installs are easy :-)
 class InstallClass(BaseInstallClass):
diff --git a/installmethod.py b/installmethod.py
index 20e9af4..b659e23 100644
--- a/installmethod.py
+++ b/installmethod.py
@@ -15,8 +15,6 @@ import os
 import string
 from constants import *
 
-import logging
-log = logging.getLogger("anaconda")
 
 ## Raised by subclasses of InstallMethod when an error occurs copying a file.
 class FileCopyException(Exception):
diff --git a/instdata.py b/instdata.py
index 8c1d1dc..f746987 100644
--- a/instdata.py
+++ b/instdata.py
@@ -38,8 +38,6 @@ from constants import *
 from rhpl.simpleconfig import SimpleConfigFile
 import rhpl.keyboard as keyboard
 
-import logging
-log = logging.getLogger("anaconda")
 
 # Collector class for all data related to an install/upgrade.
 
diff --git a/iscsi.py b/iscsi.py
index 2eec54e..7f9010a 100644
--- a/iscsi.py
+++ b/iscsi.py
@@ -17,11 +17,9 @@ import string
 import signal
 import iutil
 from flags import flags
-import logging
 import shutil
 import time
 import md5, random
-log = logging.getLogger("anaconda")
 
 from rhpl.translate import _, N_
 
diff --git a/isys/isys.py b/isys/isys.py
index eb0b4cb..67e3a3f 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -32,8 +32,6 @@ import rhpl
 import struct
 import block
 
-import logging
-log = logging.getLogger("anaconda")
 import warnings
 
 mountCount = {}
diff --git a/iutil.py b/iutil.py
index 926b0c6..0d3d041 100644
--- a/iutil.py
+++ b/iutil.py
@@ -21,8 +21,6 @@ import warnings
 import subprocess
 from flags import flags
 
-import logging
-log = logging.getLogger("anaconda")
 
 ## Run an external program and redirect the output to a file.
 # @param command The command to run.
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 5d81064..1d52ec3 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -28,8 +28,6 @@ from partition_ui_helpers_gui import *
 from constants import *
 import lvm
 
-import logging
-log = logging.getLogger("anaconda")
 
 class VolumeGroupEditor:
 
diff --git a/iw/netconfig_dialog.py b/iw/netconfig_dialog.py
index 7791767..d4e14b7 100644
--- a/iw/netconfig_dialog.py
+++ b/iw/netconfig_dialog.py
@@ -240,8 +240,6 @@ class NetworkConfigurator:
             try:
                 isys.configNetDevice(netdev, gateway)
             except Exception, e:
-                import logging
-                log = logging.getLogger("anaconda")
                 log.error("Error configuring network device: %s" %(e,))
                 self._handleIPError(_("Error configuring network device:"), e)
                 return
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index bee0f7b..9d5ea98 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -46,8 +46,6 @@ from partRequests import *
 from constants import *
 from partition_ui_helpers_gui import *
 
-import logging
-log = logging.getLogger("anaconda")
 
 STRIPE_HEIGHT = 35.0
 LOGICAL_INSET = 3.0
diff --git a/iw/progress_gui.py b/iw/progress_gui.py
index 801b6af..5a26e5d 100644
--- a/iw/progress_gui.py
+++ b/iw/progress_gui.py
@@ -24,8 +24,6 @@ from rhpl.translate import _, N_
 from constants import *
 import language
 
-import logging
-log = logging.getLogger("anaconda")
 
 class InstallProgressWindow (InstallWindow):
     windowTitle = N_("Installing Packages")
diff --git a/iw/task_gui.py b/iw/task_gui.py
index 66b7992..aca5266 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -22,8 +22,6 @@ import network
 from yuminstall import AnacondaYumRepo
 import yum.Errors
 
-import logging
-log = logging.getLogger("anaconda")
 
 class TaskWindow(InstallWindow):
     def getNext(self):
diff --git a/iw/upgrade_bootloader_gui.py b/iw/upgrade_bootloader_gui.py
index fbda2b9..dbbaf5f 100644
--- a/iw/upgrade_bootloader_gui.py
+++ b/iw/upgrade_bootloader_gui.py
@@ -21,8 +21,6 @@ import gtk
 from rhpl.translate import _, N_
 import checkbootloader
 
-import logging
-log = logging.getLogger("anaconda")
 
 class UpgradeBootloaderWindow (InstallWindow):
     windowTitle = N_("Upgrade Boot Loader Configuration")
diff --git a/kickstart.py b/kickstart.py
index 7079bdd..d118d03 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -34,8 +34,6 @@ from pykickstart.parser import *
 from pykickstart.version import *
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 from anaconda_log import logger, logLevelMap
 
 class AnacondaKSScript(Script):
diff --git a/language.py b/language.py
index cc14aeb..5899798 100644
--- a/language.py
+++ b/language.py
@@ -20,8 +20,6 @@ import locale
 from rhpl.translate import cat
 from rhpl.simpleconfig import SimpleConfigFile
 
-import logging
-log = logging.getLogger("anaconda")
 
 # Converts a single language into a "language search path". For example,
 # fr_FR.utf8@euro would become "fr_FR.utf8@eueo fr_FR.utf8 fr_FR fr"
diff --git a/livecd.py b/livecd.py
index e42b071..ef05eea 100644
--- a/livecd.py
+++ b/livecd.py
@@ -37,8 +37,6 @@ import iutil
 
 import packages
 
-import logging
-log = logging.getLogger("anaconda")
 
 class Error(EnvironmentError):
     pass
diff --git a/lvm.py b/lvm.py
index e1ead92..a93f568 100644
--- a/lvm.py
+++ b/lvm.py
@@ -19,8 +19,6 @@ import isys
 
 from flags import flags
 
-import logging
-log = logging.getLogger("anaconda")
 
 from constants import *
 
diff --git a/network.py b/network.py
index 3e16214..4f5b775 100644
--- a/network.py
+++ b/network.py
@@ -28,8 +28,6 @@ from flags import flags
 from rhpl.translate import _, N_
 from rhpl.simpleconfig import SimpleConfigFile
 
-import logging
-log = logging.getLogger("anaconda")
 
 class IPError(Exception):
     pass
diff --git a/packages.py b/packages.py
index aeefde2..c4b46a5 100644
--- a/packages.py
+++ b/packages.py
@@ -36,8 +36,6 @@ import rhpl
 from rhpl.translate import _
 import rhpl.arch
 
-import logging
-log = logging.getLogger("anaconda")
 
 def doPostAction(anaconda):
     anaconda.id.instClass.postAction(anaconda, flags.serial)
diff --git a/partRequests.py b/partRequests.py
index 3fbb812..5e3461d 100644
--- a/partRequests.py
+++ b/partRequests.py
@@ -32,8 +32,6 @@ import lvm
 import partedUtils
 import partIntfHelpers
 
-import logging
-log = logging.getLogger("anaconda")
 
 class DeleteSpec:
     """Defines a preexisting partition which is intended to be removed."""
diff --git a/partedUtils.py b/partedUtils.py
index 273f372..0f3161f 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -35,8 +35,6 @@ from partErrors import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 fsTypes = {}
 
diff --git a/partitions.py b/partitions.py
index 101b3f9..eb22d21 100644
--- a/partitions.py
+++ b/partitions.py
@@ -37,8 +37,6 @@ import partRequests
 import rhpl
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 # dispatch.py helper function
 def partitionObjectsInitialize(anaconda):
diff --git a/raid.py b/raid.py
index 73842da..229f97c 100644
--- a/raid.py
+++ b/raid.py
@@ -46,8 +46,6 @@ import os
 import partitions
 import partedUtils
 
-import logging
-log = logging.getLogger("anaconda")
 
 # these arches can have their /boot on RAID and not have their
 # boot loader blow up
diff --git a/rescue.py b/rescue.py
index 0c5a039..6ba25fc 100644
--- a/rescue.py
+++ b/rescue.py
@@ -29,8 +29,6 @@ import time
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 class RescueInterface:
     def waitWindow(self, title, text):
diff --git a/security.py b/security.py
index f11798d..07d6285 100644
--- a/security.py
+++ b/security.py
@@ -18,8 +18,6 @@ import iutil
 from flags import flags
 from pykickstart.constants import *
 
-import logging
-log = logging.getLogger("anaconda")
 
 selinux_states = { SELINUX_DISABLED: "disabled",
                    SELINUX_ENFORCING: "enforcing",
diff --git a/sortedtransaction.py b/sortedtransaction.py
index ee0dceb..0df96e4 100644
--- a/sortedtransaction.py
+++ b/sortedtransaction.py
@@ -7,8 +7,6 @@ from yum.Errors import YumBaseError
 import urlparse
 urlparse.uses_fragment.append('media')
 
-import logging
-log = logging.getLogger("anaconda")
 
 
 class SplitMediaTransactionData(SortableTransactionData):
diff --git a/syslogd.py b/syslogd.py
index 1971404..9dd45bf 100644
--- a/syslogd.py
+++ b/syslogd.py
@@ -18,8 +18,6 @@ import string
 from socket import *
 from select import select
 
-import logging
-log = logging.getLogger("anaconda")
 
 class Syslogd:
     def goSyslog(self, output, sockName):
diff --git a/text.py b/text.py
index a5eefb5..d6f26a5 100644
--- a/text.py
+++ b/text.py
@@ -34,8 +34,6 @@ import imputil
 import rhpl
 from rhpl.translate import _, cat, N_
 
-import logging
-log = logging.getLogger("anaconda")
 
 stepToClasses = {
     "language" : ("language_text", "LanguageWindow"),
diff --git a/textw/grpselect_text.py b/textw/grpselect_text.py
index 9bcbe82..d9d2f33 100644
--- a/textw/grpselect_text.py
+++ b/textw/grpselect_text.py
@@ -17,8 +17,6 @@ from snack import *
 from constants_text import *
 from rhpl.translate import _, N_, getDefaultLangs
 
-import logging
-log = logging.getLogger("anaconda")
 
 # kind of lame caching of translations so we don't always have
 # to do all the looping
diff --git a/textw/keyboard_text.py b/textw/keyboard_text.py
index 41e8ccf..599e533 100644
--- a/textw/keyboard_text.py
+++ b/textw/keyboard_text.py
@@ -18,8 +18,6 @@ from flags import flags
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 class KeyboardWindow:
     def __call__(self, screen, anaconda):
diff --git a/textw/language_text.py b/textw/language_text.py
index 48d26cb..3a148c9 100644
--- a/textw/language_text.py
+++ b/textw/language_text.py
@@ -16,8 +16,6 @@ from constants_text import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 class LanguageWindow:
     def __call__(self, screen, anaconda):
diff --git a/textw/network_text.py b/textw/network_text.py
index 66a6217..983702e 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -24,8 +24,6 @@ from constants_text import *
 from constants import *
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 def handleIPError(screen, field, msg):
     try:
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 6b87894..b61eddd 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -33,8 +33,6 @@ from constants import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 # sanity checking for various numeric input boxes
 def invalidInteger(str):
diff --git a/textw/progress_text.py b/textw/progress_text.py
index f99ee98..60d4a49 100644
--- a/textw/progress_text.py
+++ b/textw/progress_text.py
@@ -15,8 +15,6 @@ from snack import *
 from constants_text import *
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 def strip_markup(text):
     if text.find("<") == -1:
diff --git a/textw/upgrade_bootloader_text.py b/textw/upgrade_bootloader_text.py
index 59e0713..52b6548 100644
--- a/textw/upgrade_bootloader_text.py
+++ b/textw/upgrade_bootloader_text.py
@@ -21,8 +21,6 @@ from flags import flags
 import string
 import checkbootloader
 
-import logging
-log = logging.getLogger("anaconda")
 
 class UpgradeBootloaderWindow:
     def _ideToLibata(self, rootPath):
diff --git a/timezone.py b/timezone.py
index e38a6b0..87a07d2 100644
--- a/timezone.py
+++ b/timezone.py
@@ -15,8 +15,6 @@ import shutil
 import iutil
 from flags import flags
 
-import logging
-log = logging.getLogger("anaconda")
 
 def bool(val):
     if val: return "true"
diff --git a/upgrade.py b/upgrade.py
index f35a9e0..2e20959 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -33,8 +33,6 @@ from product import productName
 import rhpl
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 # blacklist made up of (name, arch) or 
 # (name, ) to erase all matches
diff --git a/urlinstall.py b/urlinstall.py
index f04901f..2d79449 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -28,8 +28,6 @@ from constants import *
 
 from rhpl.translate import _
 
-import logging
-log = logging.getLogger("anaconda")
 
 def urlretrieve(location, file, callback=None):
     """Downloads from location and saves to file."""
diff --git a/vnc.py b/vnc.py
index 22e5d91..36d40d8 100644
--- a/vnc.py
+++ b/vnc.py
@@ -25,9 +25,6 @@ import iutil
 import socket
 import subprocess
 
-import logging
-log = logging.getLogger("anaconda")
-
 class VncServer:
 
     def __init__(self, display="1", root="/", ip=None, name=None,
@@ -46,7 +43,6 @@ class VncServer:
         self.pw_file = pw_file
         self.pw_init_file = pw_init_file
         #self.connxinfo = self.name+":"+self.display
-        self.log = logging.getLogger("anaconda.stdout")
 
     def recoverVNCPassword(self):
         """Rescue the vncpassword from where loader left it 
@@ -165,7 +161,7 @@ class VncServer:
         """Attempt to connect to self.vncconnecthost"""
 
         maxTries = 10
-        self.log.info(_("Attempting to connect to vnc client on host %s...") % (self.vncconnecthost,))
+        stdoutlog.info(_("Attempting to connect to vnc client on host %s...") % (self.vncconnecthost,))
 
         if self.vncconnectport != "":
             hostarg = self.vncconnecthost + ":" + self.vncconnectport
@@ -179,16 +175,16 @@ class VncServer:
             (out, err) = vncconfp.communicate()
 
             if err == '':
-                self.log.info(_("Connected!"))
+                stdoutlog.info(_("Connected!"))
                 return True
             elif err.startswith("connecting") and err.endswith("failed\n"):
-                self.log.info(_("Will try to connect again in 15 seconds..."))
+                stdoutlog.info(_("Will try to connect again in 15 seconds..."))
                 time.sleep(15)
                 continue
             else:
                 log.critical(err)
                 sys.exit(1)
-        self.log.error(_("Giving up attempting to connect after %d tries!\n" % maxTries ))
+        stdoutlog.error(_("Giving up attempting to connect after %d tries!\n" % maxTries ))
         return False
 
     def VNCListen(self):
@@ -197,12 +193,12 @@ class VncServer:
         We dont really have to do anything for the server to listen :)
         """
         if self.connxinfo != None:
-            self.log.info(_("Please manually connect your vnc client to %s to begin the install.") % (self.connxinfo,))
+            stdoutlog.info(_("Please manually connect your vnc client to %s to begin the install.") % (self.connxinfo,))
         else:
-            self.log.info(_("Please manually connect your vnc client to begin the install."))
+            stdoutlog.info(_("Please manually connect your vnc client to begin the install."))
 
     def startServer(self, vncStartedCB=None):
-        self.log.info(_("Starting VNC..."))
+        stdoutlog.info(_("Starting VNC..."))
 
         # Lets call it from here for now.
         self.initialize()
@@ -227,7 +223,7 @@ class VncServer:
         if xvncp.poll() != None:
             sys.exit(1)
         else:
-            self.log.info(_("The VNC server is now running."))
+            stdoutlog.info(_("The VNC server is now running."))
 
         # Lets look at the password stuff
         if self.password == "":
@@ -240,18 +236,18 @@ class VncServer:
 
         # Lets tell the user what we are going to do.
         if self.vncconnecthost != "":
-            self.log.warning(_("\n\nYou chose to connect to a listening vncviewer. \n"
+            stdoutlog.warning(_("\n\nYou chose to connect to a listening vncviewer. \n"
                                 "This does not require a password to be set.  If you \n"
                                 "set a password, it will be used in case the connection \n"
                                 "to the vncviewer is unsuccessful\n\n"))
         elif self.password == "":
-             self.log.warning(_("\n\nWARNING!!! VNC server running with NO PASSWORD!\n"
+             stdoutlog.warning(_("\n\nWARNING!!! VNC server running with NO PASSWORD!\n"
                                 "You can use the self.password=<password> boot option\n"
                                 "if you would like to secure the server.\n\n"))
         elif self.password != "":
-             self.log.warning(_("\n\nYou chose to execute vnc with a password. \n\n"))
+             stdoutlog.warning(_("\n\nYou chose to execute vnc with a password. \n\n"))
         else:
-             self.log.warning(_("\n\nUnknown Error.  Aborting. \n\n"))
+             stdoutlog.warning(_("\n\nUnknown Error.  Aborting. \n\n"))
              sys.exit(1)
 
         # Lets try to configure the vnc server to whatever the user specified
diff --git a/whiteout.py b/whiteout.py
index 3632b75..85c7e8e 100644
--- a/whiteout.py
+++ b/whiteout.py
@@ -4,8 +4,6 @@
 # Copyright 2002-2004  Red Hat, Inc.
 #
 
-import logging
-log = logging.getLogger("anaconda")
 
 whiteout="""
 	pango-gtkbeta-devel>pango-gtkbeta\
diff --git a/yuminstall.py b/yuminstall.py
index 5f4ba6f..f35e442 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -41,8 +41,6 @@ from rhpl.translate import _
 rpm.addMacro("_i18ndomains", "redhat-dist")
 
 import logging
-log = logging.getLogger("anaconda")
-
 import urlparse
 urlparse.uses_fragment.append('media')
 
diff --git a/zfcp.py b/zfcp.py
index 8a9ae1b..3e552cb 100644
--- a/zfcp.py
+++ b/zfcp.py
@@ -21,8 +21,6 @@ import shutil
 
 from rhpl.translate import _, N_
 
-import logging
-log = logging.getLogger("anaconda")
 import warnings
 
 def loggedWriteLineToFile(fn, value):
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux