Closed maphew closed 4 years ago
@maphew Just to be clear, are you saying we should add a test to shortcut.shortcut()
that script
is a string (not None
or anything else) and giving a better message before doing .split()
? I'm OK with that.
Yeah, something like that. It wold be helpful to emit the name of the var which has a problem (script). I swirled in confusion for awhile because I didn't know if the crash was coming from my code which surrounded the call to shortcut or inside it.
If one tries to create a shortcut with an empty cmd it fails with the message
AttributeError: 'NoneType' object has no attribute 'split'
.It could be more explicit about what's wrong. I'm not sure where's best place to put an error message, or very clear on the best practice for how.