示例#1
0
文件: command.py 项目: B-Rich/ctk
    def err(self, msg):
        """
        Called by ``Command._err()``.

        Prepends 'error: ' to `msg` if it's not already present.
        Adds trailing linesep to `msg` if there's not one already.
        """
        return prepend_error_if_missing(msg)
示例#2
0
文件: command.py 项目: MShaffar19/ctk
    def err(self, msg):
        """
        Called by ``Command._err()``.

        Prepends 'error: ' to `msg` if it's not already present.
        Adds trailing linesep to `msg` if there's not one already.
        """
        return prepend_error_if_missing(msg)
示例#3
0
文件: cli.py 项目: MShaffar19/ctk
 def _commandline_error(self, cl, msg):
     args = (self.program_name, cl.name, msg)
     msg = '%s %s failed: %s' % args
     sys.stderr.write(prepend_error_if_missing(msg))
     return self._exit(1)
示例#4
0
文件: cli.py 项目: ContinuumIO/ctk
 def _commandline_error(self, cl, msg):
     args = (self.program_name, cl.name, msg)
     msg = '%s %s failed: %s' % args
     sys.stderr.write(prepend_error_if_missing(msg))
     return self._exit(1)