mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Decode output from subprocess before performing string operations
This commit is contained in:
@@ -29,7 +29,7 @@ def get_os_release_variable(key):
|
|||||||
return subprocess.check_output([
|
return subprocess.check_output([
|
||||||
'/bin/bash', '-c',
|
'/bin/bash', '-c',
|
||||||
"source /etc/os-release && echo ${{{key}}}".format(key=key)
|
"source /etc/os-release && echo ${{{key}}}".format(key=key)
|
||||||
]).trim()
|
]).decode().trim()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user