MCPcopy Create free account
hub / github.com/ImageEngine/cortex / setDefaultVersion

Method setDefaultVersion

python/IECore/ClassLoader.py:104–113  ·  view source on GitHub ↗
( self, name, version )

Source from the content-addressed store, hash-verified

102 # This is the version that is loaded if no version
103 # is specified in the load() method.
104 def setDefaultVersion( self, name, version ) :
105
106 self.__validateVersion( version )
107
108 c = self.__findClass( name )
109
110 if not version in c["versions"] :
111 raise RuntimeError( "Class \"%s\" has no version %d." % (name, version) )
112
113 self.__defaultVersions[name] = version
114
115 ## Returns the default version for the named class.
116 # This is the version that is loaded if no version

Callers 1

testRefreshMethod · 0.95

Calls 2

__validateVersionMethod · 0.95
__findClassMethod · 0.95

Tested by

no test coverage detected