kirillsulim / hoox

Git hooks manager
MIT License
1 stars 0 forks source link

Hide utility functions #7

Closed kirillsulim closed 5 years ago

kirillsulim commented 5 years ago

For example hoox get_function_name fail with stacktrace:

[sulim@sulim-pc hercules]$ hoox get_function_name
Traceback (most recent call last):
  File "/home/sulim/.local/bin/hoox", line 11, in <module>
    load_entry_point('hoox', 'console_scripts', 'hoox')()
  File "/home/sulim/git/kirillsulim/hoox/src/hoox/hoox.py", line 29, in main
    exit(func(main_args.options))
  File "/home/sulim/git/kirillsulim/hoox/src/hoox/hoox.py", line 149, in get_function_name
    return name.replace('-', '_')
AttributeError: 'list' object has no attribute 'replace'

But get_function_name is utility function and in that case error message like "No such subcommand, subcommands are [subcommands list]" must be shown.