def is_old_code():
 code_exists = exists('~/viewfinder')
 if (not code_exists):
  return False
 with settings(warn_only=True):
  is_link = run('readlink ~/viewfinder')
 if (is_link.return_code == 0):
  return False
 return True

def is_old_code ( ) : code_exists = exists ( '~/viewfinder' ) if ( not code_exists ) : return False with settings ( warn_only = True ) : is_link = run ( 'readlink ~/viewfinder' ) if ( is_link . return_code == 0 ) : return False return True
return true if ~/viewfinder is old-style or false if new style .