diff --git a/python/paddle/fluid/core.py b/python/paddle/fluid/core.py index d87363abf14cdfc3e29567bd41dbac387b882f76..a05aa3b0a84b57bb1f9ce00b0ad007280c316c6e 100644 --- a/python/paddle/fluid/core.py +++ b/python/paddle/fluid/core.py @@ -201,10 +201,13 @@ def pre_load(dso_name): def get_glibc_ver(): - return run_shell_command("ldd --version | awk '/ldd/{print $NF}'").strip() + return run_shell_command("ldd --version | awk '/ldd/{print $NF}'") def less_than_ver(a, b): + if a is None or b is None: + return False + import re import operator