Did I find the right examples for you? yes no

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/p/y/python-ironicclient-0.1.4/ironicclient/openstack/common/strutils.py   python-ironicclient(Download)
import six
 
from ironicclient.openstack.common.gettextutils import _
 
 
        acceptable = ', '.join(
            "'%s'" % s for s in sorted(TRUE_STRINGS + FALSE_STRINGS))
        msg = _("Unrecognized value '%(val)s', acceptable values are:"
                " %(acceptable)s") % {'val': subject,
                                      'acceptable': acceptable}
            return magnitude
    elif text:
        msg = _('Invalid string format: %s') % text
        raise TypeError(msg)
    else:
        return default
    mult_key = mult_key_org.lower().replace('b', '', 1)
    multiplier = BYTE_MULTIPLIERS.get(mult_key)
    if multiplier is None:
        msg = _('Unknown byte multiplier: %s') % mult_key_org

src/p/y/python-ironicclient-0.1.4/ironicclient/openstack/common/cliutils.py   python-ironicclient(Download)
 
from ironicclient.openstack.common.apiclient import exceptions
from ironicclient.openstack.common.gettextutils import _
from ironicclient.openstack.common import strutils
from ironicclient.openstack.common import uuidutils
            return manager.find(**kwargs)
        except exceptions.NotFound:
            msg = _("No %(name)s with a name or "
                    "ID of '%(name_or_id)s' exists.") % \
                {
            raise exceptions.CommandError(msg)
    except exceptions.NoUniqueMatch:
        msg = _("Multiple %(name)s matches found for "
                "'%(name_or_id)s', use an ID to be more specific.") % \
            {