remove unused 'constants' module

This commit is contained in:
Will Woods 2011-06-27 14:51:54 -04:00
parent 9ac7db8cb1
commit c2631bd8e3
2 changed files with 0 additions and 65 deletions

View File

@ -41,7 +41,6 @@ import yum
import ltmpl import ltmpl
import imgutils import imgutils
import constants
from sysutils import * from sysutils import *
from treebuilder import RuntimeBuilder, TreeBuilder from treebuilder import RuntimeBuilder, TreeBuilder
@ -154,10 +153,6 @@ class Lorax(BaseLoraxClass):
logger.critical("no root privileges") logger.critical("no root privileges")
sys.exit(1) sys.exit(1)
# do we have all lorax required commands?
self.lcmds = constants.LoraxRequiredCommands()
# TODO: actually check for required commands (runcmd etc)
# do we have a proper yum base object? # do we have a proper yum base object?
logger.info("checking yum base object") logger.info("checking yum base object")
if not isinstance(ybo, yum.YumBase): if not isinstance(ybo, yum.YumBase):

View File

@ -1,60 +0,0 @@
#
# constants.py
#
# Copyright (C) 2009 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Red Hat Author(s): Martin Gracik <mgracik@redhat.com>
#
import logging
logger = logging.getLogger("pylorax")
import os
from sysutils import joinpaths
class LoraxRequiredCommands(dict):
def __init__(self):
dict.__init__(self)
self.__path = os.environ["PATH"].split(":")
logger.debug("PATH: {0}".format(self.__path))
self["AWK"] = "awk"
self["BUILD_LOCALE_ARCHIVE"] = "build-locale-archive"
self["CPIO"] = "cpio"
self["DEPMOD"] = "depmod"
self["DMSETUP"] = "dmsetup"
self["FIND"] = "find"
self["GCONFTOOL"] = "gconftool-2"
self["IMPLANTISOMD5"] = "implantisomd5"
self["ISOHYBRID"] = "isohybrid"
self["LDCONFIG"] = "ldconfig"
self["LOCALEDEF"] = "localedef"
self["LOSETUP"] = "losetup"
self["MKDOSFS"] = "mkdosfs"
self["MKISOFS"] = "mkisofs"
self["MODINFO"] = "modinfo"
self["MOUNT"] = "mount"
self["PARTED"] = "parted"
self["SSHKEYGEN"] = "ssh-keygen"
self["UMOUNT"] = "umount"
def __getattr__(self, attr):
return self[attr]
FS_OVERHEAD = 512