mirror of https://github.com/coqui-ai/TTS.git
Update generic_utils.py (#3561)
Handles cases when git branch produces no output or invalid output. Right now, it just crashes with `StopIteration`dev
parent
5dcc16d193
commit
dbf1a08a0d
|
@ -36,9 +36,7 @@ def get_git_branch():
|
|||
current.replace("* ", "")
|
||||
except subprocess.CalledProcessError:
|
||||
current = "inside_docker"
|
||||
except FileNotFoundError:
|
||||
current = "unknown"
|
||||
except StopIteration:
|
||||
except (FileNotFoundError, StopIteration) as e:
|
||||
current = "unknown"
|
||||
return current
|
||||
|
||||
|
|
Loading…
Reference in New Issue