Skip to content

Instantly share code, notes, and snippets.

@markmc
Last active December 12, 2015 00:09
Show Gist options
  • Save markmc/4682108 to your computer and use it in GitHub Desktop.
Save markmc/4682108 to your computer and use it in GitHub Desktop.
CONF.register_opt(StrOpt('root_helper'))
CONF.register_opt(StrOpt('root_helper'), group='agent')
def get_root_helper():
root_helper = CONF.agent.root_helper
if root_helper is not None:
return root_helper
root_helper = CONF.root_helper:
if root_helper is not None:
warn('DEFAULT.root_helper is deprecated!')
return root_helper
return 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment