Skip to content

Commit

Permalink
build_and_push.py: Support python3 (#183)
Browse files Browse the repository at this point in the history
In python 3 we have to use decode to explicitly convert from bytes to string.
  • Loading branch information
gaocegege authored and jlewi committed Nov 29, 2017
1 parent f8ec762 commit 0b8eb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/tf_sample/build_and_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def GetGitHash():
# The image tag is based on the githash.
git_hash = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])
git_hash = git_hash.strip()
git_hash = git_hash.strip().decode("utf-8")
modified_files = subprocess.check_output(["git", "ls-files", "--modified"])
untracked_files = subprocess.check_output(
["git", "ls-files", "--others", "--exclude-standard"])
Expand Down

0 comments on commit 0b8eb70

Please sign in to comment.