Fixed usage of last when no history file

This commit is contained in:
Jedrzej Nowak 2015-10-01 15:09:18 +02:00
parent d4618d6e74
commit b6a221138e

View File

@ -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