diff options
Diffstat (limited to 'oslo_concurrency/processutils.py')
-rw-r--r-- | oslo_concurrency/processutils.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/oslo_concurrency/processutils.py b/oslo_concurrency/processutils.py index 1f46221..f3a51c6 100644 --- a/oslo_concurrency/processutils.py +++ b/oslo_concurrency/processutils.py @@ -327,11 +327,16 @@ def execute(*cmd, **kwargs): cmd = [str(c) for c in cmd] if prlimit: - args = [sys.executable, '-m', 'oslo_concurrency.prlimit'] - args.extend(prlimit.prlimit_args()) - args.append('--') - args.extend(cmd) - cmd = args + if os.name == 'nt': + LOG.log(loglevel, + _('Process resource limits are ignored as ' + 'this feature is not supported on Windows.')) + else: + args = [sys.executable, '-m', 'oslo_concurrency.prlimit'] + args.extend(prlimit.prlimit_args()) + args.append('--') + args.extend(cmd) + cmd = args sanitized_cmd = strutils.mask_password(' '.join(cmd)) |