def sanitiseBase32(data):
 data = data.upper()
 if ('1' in data):
  log.info(('Found a "1" in Base32-encoded "%s".  Assuming it\'s actually "I".' % data))
  data = data.replace('1', 'I')
 if ('0' in data):
  log.info(('Found a "0" in Base32-encoded "%s".  Assuming it\'s actually "O".' % data))
  data = data.replace('0', 'O')
 return data

def sanitiseBase32 ( data ) : data = data . upper ( ) if ( '1' in data ) : log . info ( ( 'Found a "1" in Base32-encoded "%s".  Assuming it\'s actually "I".' % data ) ) data = data . replace ( '1' , 'I' ) if ( '0' in data ) : log . info ( ( 'Found a "0" in Base32-encoded "%s".  Assuming it\'s actually "O".' % data ) ) data = data . replace ( '0' , 'O' ) return data
try to sanitise a base32 string if its slightly wrong .