Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

        def description(greeting=None, valediction="Success!"):

    def decorator(func):

        @functools.wraps(func)
        def wrapped(self):
            if greeting:
                self._logger.log(greeting)
            try:
                func(self)
            except CryptorException as e:
                if e.args[0] == 'Bad data!':
                    raise
                else:
                    self._logger.log("Error! %s\n%s" % (e, traceback.format_exc()), file=sys.stderr, color='red')
                    sys.exit(1)
            except Exception as exc:
                self._logger.log("Error! %s\n%s" % (exc, traceback.format_exc()), file=sys.stderr, color='red')
                sys.exit(1)

            self._logger.log(valediction, color='green')
            return

        return wrapped

    return decorator
        


src/s/e/serverauditor-sshconfig-0.7.2/serverauditor_sshconfig/sa_import.py   serverauditor-sshconfig(Download)
import sys
 
from serverauditor_sshconfig.core.application import SSHConfigApplication, description
from serverauditor_sshconfig.core.api import API
from serverauditor_sshconfig.core.cryptor import RNCryptor

src/s/e/serverauditor-sshconfig-0.7.2/serverauditor_sshconfig/sa_export.py   serverauditor-sshconfig(Download)
import sys
 
from serverauditor_sshconfig.core.application import SSHConfigApplication, description
from serverauditor_sshconfig.core.api import API
from serverauditor_sshconfig.core.cryptor import RNCryptor

src/s/e/serverauditor-sshconfig-HEAD/serverauditor_sshconfig/sa_import.py   serverauditor-sshconfig(Download)
import sys
 
from serverauditor_sshconfig.core.application import SSHConfigApplication, description
from serverauditor_sshconfig.core.api import API
from serverauditor_sshconfig.core.cryptor import RNCryptor

src/s/e/serverauditor-sshconfig-HEAD/serverauditor_sshconfig/sa_export.py   serverauditor-sshconfig(Download)
import sys
 
from serverauditor_sshconfig.core.application import SSHConfigApplication, description
from serverauditor_sshconfig.core.api import API
from serverauditor_sshconfig.core.cryptor import RNCryptor