def postmap_available(already_emitted_warning=[]):
 POSTMAP_PATH = '/usr/sbin/postmap'
 if (not os.path.exists(POSTMAP_PATH)):
  if already_emitted_warning:
   pass
  else:
   already_emitted_warning.append(True)
   logger.warn('postmap binary not found at {0}. Look in ADVANCED_INSTALLATION for the section about postfix for more information.'.format(POSTMAP_PATH))
  return False
 return True

def postmap_available ( already_emitted_warning = [ ] ) : POSTMAP_PATH = '/usr/sbin/postmap' if ( not os . path . exists ( POSTMAP_PATH ) ) : if already_emitted_warning : pass else : already_emitted_warning . append ( True ) logger . warn ( 'postmap binary not found at {0}. Look in ADVANCED_INSTALLATION for the section about postfix for more information.' . format ( POSTMAP_PATH ) ) return False return True
checks if postmap is available module-level state is used to track if we already emitted the warning .