예제 #1
0
 def __init__(self, error_info, msg_args=None, option_parser=None):
     UserError.__init__(self, error_info, msg_args=msg_args)
     self.option_parser = option_parser
     if self.option_parser:
         self.command_args = \
             self.option_parser.usage.replace("%prog",
                                              os.path.basename(sys.argv[0]))
         self.context = ["Usage: " + self.command_args]
예제 #2
0
파일: mysql.py 프로젝트: quaddra/engage
 def __init__(self, error_id, action, config, msg_args=None, developer_msg=None):
     context = ["%s of %s, instance %s" % 
                (action, config.package_name, config.id)]
     UserError.__init__(self, errors[error_id], msg_args, developer_msg, context)
예제 #3
0
파일: agilefant.py 프로젝트: quaddra/engage
 def __init__(self, error_id, action, config, msg_args=None, developer_msg=None):
     context = ["%s of %s, instance %s" % (action, config.package_name, config.id)]
     UserError.__init__(self, errors[error_id], msg_args, developer_msg, context)
     self.config = config  # keep this around just in case we want it later
예제 #4
0
 def __init__(self, error_info, msg_args=None, developer_msg=None,
              context=None):
     UserError.__init__(self, error_info, msg_args, developer_msg, context)
     self.resource_id = None