# Path: pyanaconda/constants.py
# ANACONDA_ENVIRON = "anaconda"
# 
# FIRSTBOOT_ENVIRON = "firstboot"
# 
# Path: pyanaconda/errors.py
# class RemovedModuleError(ImportError):
#     pass


import os
import imp
import inspect
import copy
import sys
import types
import logging
from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON
from pyanaconda.errors import RemovedModuleError
from pykickstart.constants import FIRSTBOOT_RECONFIG
                                             fo, module_path, module_flags)


            # get the filenames without the extensions so we can compare those
            # with the .py[co]? equivalence in mind
            # - we do not have to care about files without extension as the
            #   condition at the beginning of the for loop filters out those
            # - module_flags[0] contains the extension of the module imp found
            candidate_name = module_path[:module_path.rindex(module_flags[0])]
            loaded_name, loaded_ext = module.__file__.rsplit(".", 1)

            # restore the extension dot eaten by split
            loaded_ext = "." + loaded_ext
            
            # do not collect classes when the module is already imported
            # from different path than we are traversing
            # this condition checks the module name without file extension
            if candidate_name != loaded_name:
                continue

            # if the candidate file is .py[co]? and the loaded is not (.so)
            # skip the file as well
            if module_flags[0].startswith(".py") and not loaded_ext.startswith(".py"):
                continue

            # if the candidate file is not .py[co]? and the loaded is
            # skip the file as well
            if not module_flags[0].startswith(".py") and loaded_ext.startswith(".py"):
                continue


# Path: pyanaconda/constants.py
# ANACONDA_ENVIRON = "anaconda"
# 
# FIRSTBOOT_ENVIRON = "firstboot"
# 
# Path: pyanaconda/errors.py
# class RemovedModuleError(ImportError):
#     pass


# Path: pyanaconda/ui/common.py
import os
import imp
import inspect
import copy
import sys
import types
import logging
from pyanaconda.constants import ANACONDA_ENVIRON, FIRSTBOOT_ENVIRON
from pyanaconda.errors import RemovedModuleError
from pykickstart.constants import FIRSTBOOT_RECONFIG

                                             fo, module_path, module_flags)


            # get the filenames without the extensions so we can compare those
            # with the .py[co]? equivalence in mind
            # - we do not have to care about files without extension as the
            #   condition at the beginning of the for loop filters out those
            # - module_flags[0] contains the extension of the module imp found
            candidate_name = module_path[:module_path.rindex(module_flags[0])]
            loaded_name, loaded_ext = module.__file__.rsplit(".", 1)

            # restore the extension dot eaten by split
            loaded_ext = "." + loaded_ext
            
            # do not collect classes when the module is already imported
            # from different path than we are traversing
            # this condition checks the module name without file extension
            if candidate_name != loaded_name:
                continue

            # if the candidate file is .py[co]? and the loaded is not (.so)
            # skip the file as well
            if module_flags[0].startswith(".py") and not loaded_ext.startswith(".py"):
                continue

            # if the candidate file is not .py[co]? and the loaded is
            # skip the file as well
            if not module_flags[0].startswith(".py") and loaded_ext.startswith(".py"):
                continue


        except RemovedModuleError: