Merge pull request #21 from k-eex/master
Read .pronsolerc from current directory if not found in home directorymaster
commit
ec66e04d47
|
@ -180,7 +180,10 @@ class pronsole(cmd.Cmd):
|
||||||
def load_rc(self,rc_filename=".pronsolerc"):
|
def load_rc(self,rc_filename=".pronsolerc"):
|
||||||
self.processing_rc=True
|
self.processing_rc=True
|
||||||
try:
|
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:
|
for rc_cmd in rc:
|
||||||
if not rc_cmd.lstrip().startswith("#"):
|
if not rc_cmd.lstrip().startswith("#"):
|
||||||
self.onecmd(rc_cmd)
|
self.onecmd(rc_cmd)
|
||||||
|
|
Loading…
Reference in New Issue