diff -r 74144b0e7858 Lib/distutils/command/upload.py --- a/Lib/distutils/command/upload.py Sun Mar 16 13:55:19 2014 +1000 +++ b/Lib/distutils/command/upload.py Wed Mar 19 22:46:54 2014 +0530 @@ -79,6 +79,8 @@ gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] + else: + raise DistutilsOptionError("GPG Error : Unable to find default GPG keys") spawn(gpg_args, dry_run=self.dry_run)