Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 131504 | Differences between
and this patch

Collapse All | Expand All

(-)catalyst_support.py (-9 / +17 lines)
Lines 634-649 Link Here
634
634
635
def read_makeconf(mymakeconffile):
635
def read_makeconf(mymakeconffile):
636
       if os.path.exists(mymakeconffile):
636
       if os.path.exists(mymakeconffile):
637
           try:
637
               try:
638
                   myf=open(mymakeconffile,"r")
638
                       try:
639
                   mylines=myf.readlines()
639
                               import snakeoil.fileutils
640
                   myf.close()
640
                               return snakeoil.fileutils.read_bash_dict(mymakeconffile, sourcing_command="source")
641
                   return parse_makeconf(mylines)
641
                       except ImportError:
642
           except:
642
                               try:
643
                   raise CatalystError, "Could not open make.conf file "+mymakeconffile
643
                                       import portage_util
644
                                       return portage_util.getconfig(mymakeconffile, tolerant=1, allow_sourcing=True)
645
                               except ImportError:
646
                                       myf=open(mymakeconffile,"r")
647
                                       mylines=myf.readlines()
648
                                       myf.close()
649
                                       return parse_makeconf(mylines)
650
               except:
651
                       raise CatalystError, "Could not parse make.conf file "+mymakeconffile
644
       else:
652
       else:
645
           makeconf={}
653
               makeconf={}
646
           return makeconf
654
               return makeconf
647
655
648
def msg(mymsg,verblevel=1):
656
def msg(mymsg,verblevel=1):
649
       if verbosity>=verblevel:
657
       if verbosity>=verblevel:

Return to bug 131504