modgethanc / ttbp

the tilde.town feels engine
http://tilde.town/~endorphant/ttbp
MIT License
53 stars 14 forks source link

feels dies with a stack trace if you hit return at the initial configuration review prompt: #24

Closed feoh closed 6 years ago

feoh commented 6 years ago
welcome back, feoh.

your ttbp configuration doesn't look right. let's make you a fresh copy.

    [  0 ] editor:  vim
    [  1 ] publish dir:     blog
    [  2 ] publishing:  True

pick a setting to change (or type 'q' to exit):
Traceback (most recent call last):
  File "/usr/local/bin/feels", line 9, in <module>
    load_entry_point('ttbp', 'console_scripts', 'feels')()
  File "/home/vilmibm/src/ttbp/ttbp/ttbp.py", line 179, in start
    print(check_init())
  File "/home/vilmibm/src/ttbp/ttbp/ttbp.py", line 233, in check_init
    setup_repair()
  File "/home/vilmibm/src/ttbp/ttbp/ttbp.py", line 372, in setup_repair
    setup()
  File "/home/vilmibm/src/ttbp/ttbp/ttbp.py", line 417, in setup
    if settingList[int(choice)] == "editor":
ValueError: invalid literal for int() with base 10: ''

I'd be happy to submit a PR for this, likely fix is something like (line 417):

    if settingList[int(choice)] == "editor":

gets replaced with something like:

  if settingList[int(choice)] and settingList[int(choice)] == "editor":

That way if the user just hits enter and settingList[int(choice)] is null, we just return the current settings.

I'd be happy to submit a PR if you like - I know you prefer to give permission before accepting such things.

Anyway, thanks for writing feels and happy new year!

modgethanc commented 6 years ago

hey @feoh ! thanks for this bug report; i know i have a bunch of issues with the current settings manager, i just haven't had a chance to sort things out since i'm traveling a lot these days. if you can figure out this particular bug, feel free to go ahead and submit a PR for it. i appreciate you checking in :)

modgethanc commented 6 years ago

i have no idea when i fixed this but apparently i did! hooray.