/usr/lib/python2.6/site-packages/cinderclient/openstack/common
Edit: /usr/lib/python2.6/site-packages/cinderclient/openstack/common/importutils.pyc (2365B)
Ñò
=vVc @ sR d Z d d k Z d d k Z d „ Z d „ Z d „ Z d „ Z d d „ Z d S( s0
Import related utilities and helper functions.
iÿÿÿÿNc C s | i d ƒ \ } } } y" t | ƒ t t i | | ƒ SWn> t t f j
o, t d | t i t i
ƒ Œ f ƒ ‚ n Xd S( s9 Returns a class from a string including module and class.t .s Class %s cannot be found (%s)N( t
rpartitiont
__import__t getattrt syst modulest
ValueErrort AttributeErrort ImportErrort tracebackt format_exceptiont exc_info( t
import_strt mod_strt _sept class_str( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt import_class s
c O s t | ƒ | | Ž S( s, Import a class and return an instance of it.( R ( R t argst kwargs( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt
import_object$ s c O sQ d | | f } y t | ƒ | | Ž SWn# t j
o t | ƒ | | Ž SXd S( sð Tries to import object from default namespace.
Imports a class and return an instance of it, first by trying
to find the class in a default namespace, then failing back to
a full path if not found in the default namespace.
s %s.%sN( R R ( t
name_spaceR R R t import_value( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt import_object_ns) s
c C s t | ƒ t i | S( s Import a module.( R R R ( R ( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt
import_module7 s
c C s) y t | ƒ SWn t j
o | SXd S( s6 Try to import a module and if it fails return default.N( R R ( R t default( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt
try_import= s ( t __doc__R R R R R R t NoneR ( ( ( sV /tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/openstack/common/importutils.pyt
s