(self, verbose)
Check and set our :data:`verbose` attribute.
        The debug-level must be a string or an integer. If it is one of
        the allowed strings, GnuPG will translate it internally to it's
        corresponding integer level:

        basic     = 1-2
        advanced  = 3-5
        expert    = 6-8
        guru      = 9+

        If it's not one of the recognised string levels, then then
        entire argument is ignored by GnuPG. :(

        To fix that stupid behaviour, if they wanted debugging but typo'd
        the string level (or specified ``verbose=True``), we'll default to
        'basic' logging.
Check and set our :data:`verbose` attribute.
        The debug-level must be a string or an integer. If it is one of
        the allowed strings, GnuPG will translate it internally to it's
        corresponding integer level:
Check and set our : data : verbose attribute . The debug - level must be a string or an integer . If it is one of the allowed strings GnuPG will translate it internally to it s corresponding integer level :
def _set_verbose(self, verbose):
        """Check and set our :data:`verbose` attribute.
        The debug-level must be a string or an integer. If it is one of
        the allowed strings, GnuPG will translate it internally to it's
        corresponding integer level:

        basic     = 1-2
        advanced  = 3-5
        expert    = 6-8
        guru      = 9+

        If it's not one of the recognised string levels, then then
        entire argument is ignored by GnuPG. :(

        To fix that stupid behaviour, if they wanted debugging but typo'd
        the string level (or specified ``verbose=True``), we'll default to
        'basic' logging.
        """
        string_levels = ('basic', 'advanced', 'expert', 'guru')

        if verbose is True:
            # The caller wants logging, but we need a valid --debug-level
            # for gpg. Default to "basic", and warn about the ambiguity.
            verbose = 'basic'

        if (isinstance(verbose, str) and not (verbose in string_levels)):
            verbose = 'basic'

        self.verbose = verbose
def _set_verbose ( self , verbose ) : string_levels = ( 'basic' , 'advanced' , 'expert' , 'guru' ) if verbose is True : # The caller wants logging, but we need a valid --debug-level # for gpg. Default to "basic", and warn about the ambiguity. verbose = 'basic' if ( isinstance ( verbose , str ) and not ( verbose in string_levels ) ) : verbose = 'basic' self . verbose = verbose