def is_old_code():
  code_exists = exists('~/viewfinder')
  if not code_exists:
    # So such directory or link.
    return False
  with settings(warn_only=True):
      is_link = run('readlink ~/viewfinder')
  if is_link.return_code == 0:
    # This is a symlink. New-style code.
    return False
  return True
Return True if ~/viewfinder is old-style (plain directory) or False if new style (symlink).
dataset/ETHPy150Open viewfinderco/viewfinder/fabfile.py/is_old_code