def validate_dir_exists(root, value, default):
 p = sabnzbd.misc.real_path(root, value)
 if os.path.exists(p):
  return (None, value)
 else:
  return ((T('Folder "%s" does not exist') % p), None)

def validate_dir_exists ( root , value , default ) : p = sabnzbd . misc . real_path ( root , value ) if os . path . exists ( p ) : return ( None , value ) else : return ( ( T ( 'Folder "%s" does not exist' ) % p ) , None )
check if directory exists .