Skip to content

Commit

Permalink
Decode bytes before using them as a string
Browse files Browse the repository at this point in the history
  • Loading branch information
llucax authored and Daniel Zullo committed Oct 30, 2020
1 parent c035103 commit 66fd0e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-hub
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class Config:
try:
cmd = self.oauthtoken[1:]
self.oauthtoken = subprocess.check_output(cmd,
shell=True).strip()
shell=True).decode().strip()
except (OSError, subprocess.CalledProcessError) as e:
die("Failed to run oauthtoken command `{}`: {}", cmd, e)
self.upstream = git_config('upstream')
Expand Down

0 comments on commit 66fd0e4

Please sign in to comment.