improved conf support

--HG--
branch : pmacs2
This commit is contained in:
moculus 2007-10-18 15:48:39 +00:00
parent e8ac35f047
commit b174d5cf99
1 changed files with 5 additions and 1 deletions

View File

@ -188,6 +188,7 @@ class Application(object):
width = self.x - 1 width = self.x - 1
# run user custom code here # run user custom code here
self.rcerror = None
self.loadrc() self.loadrc()
# initialize our buffers # initialize our buffers
@ -477,7 +478,10 @@ class Application(object):
def loadrc(self): def loadrc(self):
path = os.path.join(os.getenv('HOME'), '.pmc', 'conf') path = os.path.join(os.getenv('HOME'), '.pmc', 'conf')
if os.path.exists(path): if os.path.exists(path):
try:
execfile(path) execfile(path)
except Exception, e:
self.rcerror = e
# the mighty run-loop! # the mighty run-loop!
def run(self): def run(self):