Ejemplo n.º 1
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         cls.action(context)
     else:
         ret_val = "Fatal error, cannot download!"
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 2
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         cls.action(context)
     else:
         ret_val = 'Fatal error, cannot quit!'
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 3
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         cls.action(result[1])
     else:
         ret_val = "Invalid config command argument!"
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 4
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         cls.action(result[1])
     else:
         ret_val = 'Invalid config command argument!'
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 5
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         context['cache'] = result[1]
         cls.action(context)
     else:
         ret_val = 'Invalid cache command!'
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 6
0
 def process_do(cls, line_text, context):
     ret_val = None
     arguments = argument_helper.parse(line_text)
     result = cls.query(arguments)
     if result[0] == True:
         context.clear()
         context['type'] = result[1]
         cls.action(context)
     else:
         ret_val = 'Invalid release type!'
         logging_helper.getLogger().error(ret_val)
     return ret_val
Ejemplo n.º 7
0
Archivo: CmdDiff.py Proyecto: argp/aosd
 def process_do(cls, line_text, context):
     ret_val = None
     if context.has_key('type') and context.has_key('package'):
         release_type = context.get('type', None)
         package_name = context.get('package', None)
         arguments = argument_helper.parse(line_text)
         result = cls.query(release_type, package_name, arguments)
         if result[0] == True:
             context['diff'] = result[1]
             cls.action(context)
         else:
             ret_val = 'Invalid build numbers!'
             logging_helper.getLogger().error(ret_val)
     else:
         ret_val = 'Please select a release type and package before using the "diff" command.'
         logging_helper.getLogger().info(ret_val)
     return ret_val
Ejemplo n.º 8
0
 def process_do(cls, line_text, context):
     ret_val = None
     if context.has_key('type') and context.has_key('package'):
         release_type = context.get('type', None)
         package_name = context.get('package', None)
         arguments = argument_helper.parse(line_text)
         result = cls.query(release_type, package_name, arguments)
         if result[0] == True:
             context['diff'] = result[1]
             cls.action(context)
         else:
             ret_val = 'Invalid build numbers!'
             logging_helper.getLogger().error(ret_val)
     else:
         ret_val = 'Please select a release type and package before using the "diff" command.'
         logging_helper.getLogger().info(ret_val)
     return ret_val
Ejemplo n.º 9
0
 def process_do(cls, line_text, context):
     ret_val = None
     if context.has_key('type'):
         release_type = context.get('type', None)
         release_version = None
         if context.has_key('version'):
             release_version = context.get('version', None)
         arguments = argument_helper.parse(line_text)
         result = cls.query(release_type, release_version, arguments)
         if result[0] == True:
             context['package'] = result[1][0]
             if context.has_key('version'):
                 context['build'] = result[1][1]
             cls.action(context)
         else:
             ret_val = 'Invalid package name!'
             logging_helper.getLogger().error(ret_val)
     else:
         ret_val = 'Please select a release type before using the "package" command.'
         logging_helper.getLogger().info(ret_val)
     return ret_val