(self, key, value)
Parse a status code from the attached GnuPG process.

        :raises: :exc:`~exceptions.ValueError` if the status message is unknown.
Parse a status code from the attached GnuPG process.
Parse a status code from the attached GnuPG process .
def _handle_status(self, key, value):
        """Parse a status code from the attached GnuPG process.

        :raises: :exc:`~exceptions.ValueError` if the status message is unknown.
        """
        if key in (
                "USERID_HINT",
                "NEED_PASSPHRASE",
                "BAD_PASSPHRASE",
                "GOOD_PASSPHRASE",
                "MISSING_PASSPHRASE",
                "PINENTRY_LAUNCHED",
                "BEGIN_SIGNING",
                "CARDCTRL",
                "INV_SGNR",
                "SIGEXPIRED",
                "KEY_CONSIDERED",
            ):
            self.status = key.replace("_", " ").lower()
        elif key == "SIG_CREATED":
            (self.sig_type, self.sig_algo, self.sig_hash_algo,
             self.what, self.timestamp, self.fingerprint) = value.split()
        elif key == "KEYEXPIRED":
            self.status = "skipped signing key, key expired"
            if (value is not None) and (len(value) > 0):
                 self.status += " on {}".format(str(value))
        elif key == "KEYREVOKED":
            self.status = "skipped signing key, key revoked"
            if (value is not None) and (len(value) > 0):
                 self.status += " on {}".format(str(value))
        elif key == "NODATA":
            self.status = nodata(value)
        elif key == "PROGRESS":
            self.status = progress(value.split(' ', 1)[0])
        else:
            raise ValueError("Unknown status message: %r" % key)
def _handle_status ( self , key , value ) : if key in ( "USERID_HINT" , "NEED_PASSPHRASE" , "BAD_PASSPHRASE" , "GOOD_PASSPHRASE" , "MISSING_PASSPHRASE" , "PINENTRY_LAUNCHED" , "BEGIN_SIGNING" , "CARDCTRL" , "INV_SGNR" , "SIGEXPIRED" , "KEY_CONSIDERED" , ) : self . status = key . replace ( "_" , " " ) . lower ( ) elif key == "SIG_CREATED" : ( self . sig_type , self . sig_algo , self . sig_hash_algo , self . what , self . timestamp , self . fingerprint ) = value . split ( ) elif key == "KEYEXPIRED" : self . status = "skipped signing key, key expired" if ( value is not None ) and ( len ( value ) > 0 ) : self . status += " on {}" . format ( str ( value ) ) elif key == "KEYREVOKED" : self . status = "skipped signing key, key revoked" if ( value is not None ) and ( len ( value ) > 0 ) : self . status += " on {}" . format ( str ( value ) ) elif key == "NODATA" : self . status = nodata ( value ) elif key == "PROGRESS" : self . status = progress ( value . split ( ' ' , 1 ) [ 0 ] ) else : raise ValueError ( "Unknown status message: %r" % key )