diff options
author | colml <colml@users.noreply.github.com> | 2016-06-03 09:32:47 +0100 |
---|---|---|
committer | colml <colml@users.noreply.github.com> | 2016-06-03 09:32:47 +0100 |
commit | 9134f76aab9a124e6aa1cb996c05fa8076f7debd (patch) | |
tree | f7509a1faaca8cc88adcfd2c843393a865812291 | |
parent | c58895226e62be26d3ef940b21e09289ca358eed (diff) | |
download | rtslib-fb-9134f76aab9a124e6aa1cb996c05fa8076f7debd.tar.gz |
Fix mount race condition
-rw-r--r-- | rtslib/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rtslib/utils.py b/rtslib/utils.py index acf8aa5..c9f8213 100644 --- a/rtslib/utils.py +++ b/rtslib/utils.py @@ -440,7 +440,8 @@ def mount_configfs(): stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdoutdata, stderrdata) = process.communicate() - if process.returncode != 0: + if process.returncode != 0 and not os.path.ismount( + "/sys/kernel/config"): raise RTSLibError("Cannot mount configfs") def dict_remove(d, items): |