def call_thenfunc(self,fname = None , storage = None ):
			sp = storage.get("spider")
			fn = self.then_func.get( sp , self.then_func.get(None) )
			path_attrs = storage.path_attrs
			if fn:
				return fn(file_attrib(fd,"name"))
			return None
Example #2
0
	def then(self , fd_closed, spider , stream):
		from scrapingtools.lib.storage.utils import file_attrib
		fname = file_attrib(fd_close, "name")
		self.sigman.send_catch_log( EmitFile , \
									fname = fname , \
									storage = self.bindings )
		self.sigman.send_catch_log( PipeClosed , \
									pipeline = self , \
									storage = self.bindings )