def _contextkey(jail=None, chroot=None, root=None, prefix='pkg.list_pkgs'):
 if jail:
  return (str(prefix) + '.jail_{0}'.format(jail))
 elif chroot:
  return (str(prefix) + '.chroot_{0}'.format(chroot))
 elif root:
  return (str(prefix) + '.root_{0}'.format(root))
 return prefix

def _contextkey ( jail = None , chroot = None , root = None , prefix = 'pkg.list_pkgs' ) : if jail : return ( str ( prefix ) + '.jail_{0}' . format ( jail ) ) elif chroot : return ( str ( prefix ) + '.chroot_{0}' . format ( chroot ) ) elif root : return ( str ( prefix ) + '.root_{0}' . format ( root ) ) return prefix
as this module is designed to manipulate packages in jails and chroots .