manolomartinez / greg

A command-line podcast aggregator
GNU General Public License v3.0
297 stars 37 forks source link

running 'greg' alone crashes: #42

Closed mfeif closed 8 years ago

mfeif commented 8 years ago
~$ greg
Traceback (most recent call last):
  File "/home/mjf/.local/bin/greg", line 9, in <module>
    load_entry_point('Greg==0.4.5', 'console_scripts', 'greg')()
  File "/home/mjf/.local/lib/python3.4/site-packages/greg/gregparser.py", line 113, in main
    args.func(vars(args))
AttributeError: 'Namespace' object has no attribute 'func'
ghost commented 8 years ago

I confirm this. Installing from https://github.com/manolomartinez/greg/commit/9c223ca57f6f1dcae9b4a1bceafe769b7d2c41a2

ghost commented 8 years ago

This happens because argparse is expecting command line arguments but when none are passed func is empty and it throws an error.

One way to fix is set a default arg when calling greg without any arguments. Maybe...

ghost commented 8 years ago

Yeeeah, that didn't fix it. Ignore that commit.

ghost commented 8 years ago

Nope I was right after all, that commit did fix it. I just found another bug: #43

manolomartinez commented 8 years ago

This is a slightly cleaner way to do it, I reckon.

ghost commented 8 years ago

It is indeed.