ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
436 stars 112 forks source link

backtrace when configuration is auto-reloaded #54

Closed ghantoos closed 11 years ago

ghantoos commented 11 years ago

When configuration is edited, lshell reloads it automatically. This currently fails.

ghantoos:~$ ls
Traceback (most recent call last):
  File "./bin/lshell", line 54, in <module>
    main()
  File "./bin/lshell", line 44, in main
    cli.cmdloop()
  File "/home/ghantoos/src/lshell/lshell/shellcmd.py", line 554, in cmdloop
    stop = self.onecmd(line)
  File "/home/ghantoos/src/lshell/lshell/shellcmd.py", line 677, in onecmd
    func = getattr(self, 'do_' + cmd)
  File "/home/ghantoos/src/lshell/lshell/shellcmd.py", line 95, in __getattr__
    self.conf = CheckConfig(self.args).returnconf()
  File "/home/ghantoos/src/lshell/lshell/checkconfig.py", line 99, in __init__
    self.conf['config_mtime'] = self.get_config_mtime(configfile)
  File "/home/ghantoos/src/lshell/lshell/checkconfig.py", line 739, in get_config_mtime
    return os.path.getmtime(configfile)
  File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: '/home/lshell.conf'