msg = "{} environment".format(build["properties"]["environment"][0])
if "build" in build["properties"]:
msg = "of archive {} in ".format(build["properties"]["build"][0]) + msg
- elif len(build["buildset"]["sourcestamps"][0]["branch"]) > 0:
+ elif len(build["buildset"]["sourcestamps"][0]["branch"] or []) > 0:
msg = "revision {}".format(build["buildset"]["sourcestamps"][0]["branch"])
else:
msg = "build"
msg = "{} environment".format(build["properties"]["environment"][0])
if "build" in build["properties"]:
msg = "of archive {} in ".format(build["properties"]["build"][0]) + msg
- elif len(build["buildset"]["sourcestamps"][0]["branch"]) > 0:
+ elif len(build["buildset"]["sourcestamps"][0]["branch"] or []) > 0:
msg = "revision {}".format(build["buildset"]["sourcestamps"][0]["branch"])
else:
msg = "build"