
                  	       b    S r SSKrSSKJrJr  SSKJr  SSKJr  S
S\\   S\S\\\4   4S	 jjr	g)z*General utility functions for diagnostics.    N)ListTuple)execution_utils)logargsin_strreturnc                    [         R                  " 5       nUR                  U 5        [        R                  " 5       n[        R                  " 5       n[         R
                  " USUR                  UR                  US9nUR                  5       nUR                  5       n[        R                  " SU5        [        R                  " SU5        US:w  a  U(       d  SU 3nUS:X  a  UOSUS:w  a  U4$ S4$ )zRuns a gcloud command.

Args:
  args: The arguments to pass to the gcloud command.
  in_str: The input to pass to the gcloud command.

Returns:
  A tuple containing the stdout and stderr of the command.
T)no_exitout_funcerr_funcr   z
stdout: %sz
stderr: %sr   zgcloud exited with return code N)
r   ArgsForGcloudextendioStringIOExecwritegetvaluer   debug)r   r   commandouterr
returncodestdoutstderrs           8lib/googlecloudsdk/command_lib/storage/diagnose/utils.py
run_gcloudr      s     ))+'	..
#
###yyyy* <<>&<<>&))L&!))L&!1_V.zl;FafTaf
 %)
     )N)
__doc__r   typingr   r   googlecloudsdk.corer   r   strr    r   r   <module>r$      s<    1 	  / #"T#Y " "uS#X "r   