diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-10 17:16:58 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-10 17:16:58 +0100 |
| commit | 94148135abcc397ad0ac4475cf8ef4fa7b73308a (patch) | |
| tree | 66b067940831bf3006bfa0673a4601e494206c10 /src/allocators.py | |
| parent | 4c0830ffbc045290c167e482855cb25a639df0e0 (diff) | |
| download | allocbench-94148135abcc397ad0ac4475cf8ef4fa7b73308a.tar.gz allocbench-94148135abcc397ad0ac4475cf8ef4fa7b73308a.zip | |
don't use subprocess.check_output to support python3 < 3.7.0
Diffstat (limited to 'src/allocators.py')
| -rw-r--r-- | src/allocators.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/allocators.py b/src/allocators.py index dbf26d1..717c500 100644 --- a/src/allocators.py +++ b/src/allocators.py @@ -12,8 +12,9 @@ allocators = {"libc": {"cmd_prefix" : "", for i, t in enumerate(maybe_allocators): try: - path = subprocess.check_output('whereis lib{} | cut -d":" -f2'.format(t), - shell=True, text=True).strip() + path = subprocess.run('whereis lib{} | cut -d":" -f2'.format(t), + shell=True, stdout=subprocess.PIPE, + universal_newlines=True).stdout.strip() if path != "": allocators[t] = {"cmd_prefix": "", "binary_suffix": "", |
