That makes no sense. By this logic a country couldn't prosecute foreign spies.
As for the death penalty, I'm against it but I'm also a fan of well deserved schadenfreude, so I'll just quote what Assange said to journalists who encouraged him to redact the names of Afghan translators being used by the coalition forces there: