Commit f2155380 authored by kliment's avatar kliment

Merge pull request #6 from k-eex/master

bugfixes for .pronsolerc handling
parents 718eaf5c 1a37c6ee
# Sample .pronsolerc file - copy this into your home directory # Sample .pronsolerc file - copy this into your home directory
alias up move Z 10 alias up move Z 10
alias loud !self.loud = 1 alias loud !self.p.loud = 1
alias quiet !self.loud = 0 alias quiet !self.p.loud = 0
alias home_all G28 alias home_all G28
...@@ -132,7 +132,7 @@ class pronsole(cmd.Cmd): ...@@ -132,7 +132,7 @@ class pronsole(cmd.Cmd):
try: try:
with open(os.path.join(os.path.expanduser("~"),".pronsolerc")) as rc: with open(os.path.join(os.path.expanduser("~"),".pronsolerc")) as rc:
for rc_cmd in rc: for rc_cmd in rc:
if rc_cmd.lstrip()[0] != "#": if not rc_cmd.lstrip().startswith("#"):
self.onecmd(rc_cmd) self.onecmd(rc_cmd)
except IOError: except IOError:
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment