Beispiel #1
0
 def Run(self, args):
     holder = info_holder.InfoHolder()
     python_version = platforms.PythonVersion()
     if not python_version.IsSupported():
         log.warn((
             'Only Python version {0} is supported for the Cloud SDK. Many '
             'commands will work with a previous version, but not all.'
         ).format(python_version.MinSupportedVersionString()))
     return holder
Beispiel #2
0
 def Run(self, args):
     info = info_holder.InfoHolder()
     log_data = None
     if args.log_file:
         try:
             log_data = info_holder.LogData.FromFile(args.log_file)
         except IOError as err:
             log.warn('Error reading the specified file [{0}]: '
                      '{1}\n'.format(args.log_file, err))
     if args.quiet:
         _PrintQuiet(str(info), log_data)
     else:
         log.status.Print(FEEDBACK_MESSAGE)
         if not log_data:
             log_data = _SuggestIncludeRecentLogs()
         if console_io.PromptContinue(prompt_string=FEEDBACK_PROMPT):
             _OpenNewIssueInBrowser(info, log_data)
Beispiel #3
0
 def Run(self, args):
   info = info_holder.InfoHolder()
   log_data = None
   if args.log_file:
     try:
       log_data = info_holder.LogData.FromFile(args.log_file)
     except IOError as err:
       log.warn('Error reading the specified file [{0}]: '
                '{1}\n'.format(args.log_file, err))
   if args.quiet:
     _PrintQuiet(str(info), log_data)
   else:
     log.status.Print(FEEDBACK_MESSAGE)
     if not log_data:
       log_data = _SuggestIncludeRecentLogs()
     if log_data or console_io.PromptContinue(
         prompt_string=('No invocation selected. Would you still like to file '
                        'a bug (will open a new browser tab)')):
       feedback_util.OpenNewIssueInBrowser(info, log_data)