Merge pull request #216 from pigmej/uids_fix-1
Fixed usage of `last` when no history file
This commit is contained in:
commit
51ba1dde80
@ -65,7 +65,11 @@ class SolarUIDParameterType(click.types.StringParamType):
|
||||
|
||||
def convert(self, value, param, ctx):
|
||||
value = click.types.StringParamType.convert(self, value, param, ctx)
|
||||
value = get_uid(value)
|
||||
try:
|
||||
value = get_uid(value)
|
||||
except IOError:
|
||||
raise click.BadParameter("Unable to locate file %r so"
|
||||
"you can't use 'last' shortcuts" % UIDS_HISTORY)
|
||||
return value
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user