How to use the pydeps.pyTensible.Manifest.MalformedManifest function in pydeps

To help you get started, we’ve selected a few pydeps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MorganBorman / cxsbs / pydeps / pyTensible / Manifest.py View on Github external
resource_symbolic_name = description[:interface_start]
			
			if interface_end == -1:
				raise MalformedManifest("Found no closing parenthesis in resource description '%s'" % description)
			
			resource_interface = description[interface_start+1:interface_end]
			
		elif description.find('[') != -1:
			resource_type = type
			
			interface_start = description.find('[')
			interface_end = description.find(']')
			
			if interface_start == 0:
				raise MalformedManifest("Found zero length resource name in resource description '%s'" % description)
			
			resource_symbolic_name = description[:interface_start]
			
			if interface_end == -1:
				raise MalformedManifest("Found no closing parenthesis in resource description '%s'" % description)
			
			resource_interface = description[interface_start+1:interface_end]
		else:
			resource_symbolic_name = description
		
		return {'resource_symbolic_name': resource_symbolic_name, 'resource_interface': resource_interface, 'resource_type': resource_type}
github MorganBorman / cxsbs / pydeps / pyTensible / Manifest.py View on Github external
resource_interface = None
		resource_type = None
		
		if description.find('(') != -1:
			resource_type = object
			
			interface_start = description.find('(')
			interface_end = description.find(')')
			
			if interface_start == 0:
				raise MalformedManifest("Found zero length resource name in resource description '%s'" % description)
			
			resource_symbolic_name = description[:interface_start]
			
			if interface_end == -1:
				raise MalformedManifest("Found no closing parenthesis in resource description '%s'" % description)
			
			resource_interface = description[interface_start+1:interface_end]
			
		elif description.find('[') != -1:
			resource_type = type
			
			interface_start = description.find('[')
			interface_end = description.find(']')
			
			if interface_start == 0:
				raise MalformedManifest("Found zero length resource name in resource description '%s'" % description)
			
			resource_symbolic_name = description[:interface_start]
			
			if interface_end == -1:
				raise MalformedManifest("Found no closing parenthesis in resource description '%s'" % description)
github MorganBorman / cxsbs / pydeps / pyTensible / Manifest.py View on Github external
self.enabled = manifest.get("Plug-in", "Enabled") == "True"
		
		######################################################################
		########################## Read Interfaces ###########################
		######################################################################
		'''
		These specify which interfaces this plug-in will provide.
		'''
		try:
			interfaces_provided = manifest.items("Interfaces")
		except:
			interfaces_provided = {}
		
		for interface_name, temp in interfaces_provided: #@UnusedVariable
			if '.' in interface_name:
				raise MalformedManifest("Names of interfaces provided may not have '.' in them.")
			self.interfaces_provided.append(interface_name)
			
		######################################################################
		########################## Read Resources ############################
		######################################################################
		'''
		These specify which resources this plug-in will provide and possibly which 
		interfaces each implements.
		'''
		try:
			resources_provided = manifest.items("Resources")
		except:
			resources_provided = {}
		
		for resource_description, temp in resources_provided: #@UnusedVariable
github MorganBorman / cxsbs / pydeps / pyTensible / Manifest.py View on Github external
'''
		These specify which resources this plug-in will provide and possibly which 
		interfaces each implements.
		'''
		try:
			resources_provided = manifest.items("Resources")
		except:
			resources_provided = {}
		
		for resource_description, temp in resources_provided: #@UnusedVariable
			
			#returns a dictionary {'resource_symbolic_name': resource_symbolic_name, 'resource_interface': resource_interface, 'resource_type': resource_type}
			resource_provided = self._process_resource_provided(resource_description)
			
			if '.' in resource_provided['resource_symbolic_name']:
				raise MalformedManifest("Names of resources provided may not have '.' in them.")
			
			self.resources_provided.append(resource_provided)
			
		######################################################################
		########################## Read Implements ###########################
		######################################################################
		'''
		These specify which externally provided interfaces the resources
		provided by this plug-in will implement.
		
		This tells the plug_in loader to make Accessors available for these
		prior to actually importing the plug-in.
		'''
		try:
			interfaces_implemented = manifest.items("Implements")
		except: