def _create_file_if_needed(filename):
 if os.path.exists(filename):
  return False
 else:
  open(filename, 'a+b').close()
  logger.info('Credential file {0} created'.format(filename))
  return True

def _create_file_if_needed ( filename ) : if os . path . exists ( filename ) : return False else : open ( filename , 'a+b' ) . close ( ) logger . info ( 'Credential file {0} created' . format ( filename ) ) return True
creates the an empty file if it does not already exist .