Expose r/o listener callback + details filter callback
Also makes sure that the kwargs that are returned are not mutable by returning a copy (which if modified will have no effect). Change-Id: I1d04e2084cbf93d876e946b2bd6466a4b700faad
This commit is contained in:
		@@ -55,10 +55,20 @@ class Listener(object):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self._kwargs = kwargs.copy()
 | 
					            self._kwargs = kwargs.copy()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def callback(self):
 | 
				
			||||||
 | 
					        """Callback (can not be none) to call with event + details."""
 | 
				
			||||||
 | 
					        return self._callback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def details_filter(self):
 | 
				
			||||||
 | 
					        """Callback (may be none) to call to discard events + details."""
 | 
				
			||||||
 | 
					        return self._details_filter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def kwargs(self):
 | 
					    def kwargs(self):
 | 
				
			||||||
        """Dictionary of keyword arguments to use in future calls."""
 | 
					        """Dictionary of keyword arguments to use in future calls."""
 | 
				
			||||||
        return self._kwargs
 | 
					        return self._kwargs.copy()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def args(self):
 | 
					    def args(self):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user