#NEWLINE# def validate_fingerprint( ctx , param , value ) : #NEWLINE# #INDENT# if ( value is not None ) : #NEWLINE# #INDENT# fingerprint = value . replace ( ':' , '' ) . strip ( ) . upper ( ) #NEWLINE# try : #NEWLINE# #INDENT# if ( len ( fingerprint . decode ( 'hex' ) ) != 20 ) : #NEWLINE# #INDENT# raise ValueError ( ) #NEWLINE# #UNINDENT# #UNINDENT# except ( TypeError , ValueError ) : #NEWLINE# #INDENT# raise click . BadParameter ( 'Invalid SHA1 fingerprint provided.' ) #NEWLINE# #UNINDENT# return fingerprint