mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-03 23:41:21 +00:00 
			
		
		
		
	cgroups.py: strip slashes, don't drop first char
this makes it cope with both, names starting with or without slashes
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							3c4a282c29
						
					
				
				
					commit
					4fabcae0b4
				
			@@ -262,8 +262,9 @@ class CGroup(object):
 | 
			
		||||
 | 
			
		||||
        # Control cgroup path
 | 
			
		||||
        self.directory = controller.mount_point
 | 
			
		||||
 | 
			
		||||
        if name != '/':
 | 
			
		||||
            self.directory = self.target.path.join(controller.mount_point, name[1:])
 | 
			
		||||
            self.directory = self.target.path.join(controller.mount_point, name.strip('/'))
 | 
			
		||||
 | 
			
		||||
        # Setup path for tasks file
 | 
			
		||||
        self.tasks_file = self.target.path.join(self.directory, 'tasks')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user