Merge pull request #21 from k-eex/master

Read .pronsolerc from current directory if not found in home directory
master
kliment 2011-06-25 01:06:24 -07:00
commit ec66e04d47
1 changed files with 4 additions and 1 deletions

View File

@ -180,7 +180,10 @@ class pronsole(cmd.Cmd):
def load_rc(self,rc_filename=".pronsolerc"):
self.processing_rc=True
try:
rc=open(os.path.join(os.path.expanduser("~"),rc_filename))
try:
rc=open(os.path.join(os.path.expanduser("~"),rc_filename))
except IOError:
rc=open(rc_filename)
for rc_cmd in rc:
if not rc_cmd.lstrip().startswith("#"):
self.onecmd(rc_cmd)