We don't need utils.trycmd any more.

Its only used in one place, let's just call processutils
directly instead.

Change-Id: Iff03a1b6889133ca938190a49fbf0b6b18b31c96
blueprint: hurrah-for-privsep
This commit is contained in:
Michael Still
2018-03-20 18:31:24 +11:00
committed by Matt Riedemann
parent e38caa2de0
commit 54ebc43058
3 changed files with 4 additions and 15 deletions

View File

@@ -243,17 +243,6 @@ def ssh_execute(dest, *cmd, **kwargs):
return execute(*ssh_cmd, **kwargs)
def trycmd(*args, **kwargs):
"""Convenience wrapper around oslo's trycmd() method."""
if kwargs.get('run_as_root', False):
if CONF.use_rootwrap_daemon:
return RootwrapDaemonHelper(CONF.rootwrap_config).trycmd(
*args, **kwargs)
else:
return RootwrapProcessHelper().trycmd(*args, **kwargs)
return processutils.trycmd(*args, **kwargs)
def generate_uid(topic, size=8):
characters = '01234567890abcdefghijklmnopqrstuvwxyz'
choices = [random.choice(characters) for _x in range(size)]