Skip to content

Commit

Permalink
fixes #56: corrected custom intro to print nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignace Mouzannar authored and Ignace Mouzannar committed Aug 14, 2013
1 parent 35ae2b0 commit 1dbe8c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lshell/checkconfig.py
Expand Up @@ -589,7 +589,10 @@ def get_config_user(self):
self.log.error('CONF: scpforce must be a string!')

if self.conf_raw.has_key('intro'):
self.conf['intro'] = self.conf_raw['intro']
try:
self.conf['intro'] = eval(self.conf_raw['intro'])
except:
self.conf['intro'] = intro
else:
self.conf['intro'] = intro

Expand Down
4 changes: 2 additions & 2 deletions lshell/shellcmd.py
Expand Up @@ -528,8 +528,8 @@ def cmdloop(self, intro=None):
readline.set_completer(self.complete)
readline.parse_and_bind(self.completekey+": complete")
try:
if self.conf['intro']:
self.stdout.write(str(self.conf['intro'])+"\n")
if self.intro and isinstance(self.intro, str):
self.stdout.write("%s\n" % self.intro)
if self.conf['login_script']:
os.system(self.conf['login_script'])
stop = None
Expand Down

0 comments on commit 1dbe8c3

Please sign in to comment.