def GetProgram(plist):
 try:
  return (("['%s']" % plist['Program']), HashFile(plist['Program']))
 except KeyError:
  return (plist['ProgramArguments'], HashFile(plist['ProgramArguments']))

def GetProgram ( plist ) : try : return ( ( "['%s']" % plist [ 'Program' ] ) , HashFile ( plist [ 'Program' ] ) ) except KeyError : return ( plist [ 'ProgramArguments' ] , HashFile ( plist [ 'ProgramArguments' ] ) )
plists have either a program or programarguments key .