@@ -76,36 +76,36 @@ def normalize(data, encoding='utf-8'):
7676def check_output_with_timeout (* args , ** kwargs ):
7777 """Enhanced check_output with timeout support for Python 2/3."""
7878 timeout = kwargs .pop ('timeout' , 30 )
79-
79+
8080 try :
8181 import signal
82-
82+
8383 def timeout_handler (signum , frame ):
8484 raise OSError ("Command timed out" )
85-
85+
8686 if hasattr (signal , 'SIGALRM' ):
8787 old_handler = signal .signal (signal .SIGALRM , timeout_handler )
8888 signal .alarm (timeout )
89-
89+
9090 try :
9191 p = subprocess .Popen (stdout = subprocess .PIPE , stderr = subprocess .PIPE ,
92- * args , ** kwargs )
92+ * args , ** kwargs )
9393 out , err = p .communicate ()
94-
94+
9595 if hasattr (signal , 'SIGALRM' ):
9696 signal .alarm (0 )
9797 signal .signal (signal .SIGALRM , old_handler )
98-
98+
9999 if err or p .returncode != 0 :
100100 raise OSError ("{0} ({1})" .format (normalize (err ), p .returncode ))
101101 return normalize (out )
102-
102+
103103 except OSError :
104104 if hasattr (signal , 'SIGALRM' ):
105105 signal .alarm (0 )
106106 signal .signal (signal .SIGALRM , old_handler )
107107 raise
108-
108+
109109 except Exception as e :
110110 logging .debug ('Subprocess error: %s' , str (e ))
111111 return ''
@@ -273,7 +273,6 @@ class BuildIDParsingException(Exception):
273273 pass
274274
275275
276-
277276def get_build_id (fileobj ):
278277
279278 try :
0 commit comments