nickstenning/honcho — pull request #93 by msabramo (2014-11-26 19:11:09+00:00)
Title: Add --pdb option; invokes pdb on exception

Useful for debugging. Looks like this:

$ honcho export . supervisord --pdb
[Errno 13] Permission denied: '/var/log/export_test'
Traceback (most recent call last):
File "/Users/marca/dev/git-repos/honcho/honcho/command.py", line 253, in main
COMMANDS[args.command](args)
File "/Users/marca/dev/git-repos/honcho/honcho/command.py", line 106, in command_export
export.export()
File "/Users/marca/dev/git-repos/honcho/honcho/export/base.py", line 86, in export
self._mkdir(self.options.log)
File "/Users/marca/dev/git-repos/honcho/honcho/export/base.py", line 47, in _mkdir
.format(directory))
CommandError: Can not create /var/log/export_test
> /Users/marca/dev/git-repos/honcho/honcho/export/base.py(47)_mkdir()
-> .format(directory))
(Pdb) directory
'/var/log/export_test'
(Pdb) bt
/Users/marca/dev/git-repos/honcho/honcho/command.py(253)main()
-> COMMANDS[args.command](args)
/Users/marca/dev/git-repos/honcho/honcho/command.py(106)command_export()
-> export.export()
/Users/marca/dev/git-repos/honcho/honcho/export/base.py(86)export()
-> self._mkdir(self.options.log)
> /Users/marca/dev/git-repos/honcho/honcho/export/base.py(47)_mkdir()
-> .format(directory))
(Pdb)