mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 09:02:12 +00:00 
			
		
		
		
	Fixing file_exists on linux devices.
This commit is contained in:
		@@ -937,7 +937,9 @@ class LinuxDevice(BaseLinuxDevice):
 | 
			
		||||
 | 
			
		||||
    def file_exists(self, filepath):
 | 
			
		||||
        output = self.execute('if [ -e \'{}\' ]; then echo 1; else echo 0; fi'.format(filepath))
 | 
			
		||||
        return boolean(output.strip())  # pylint: disable=maybe-no-member
 | 
			
		||||
        # output from ssh my contain part of the expression in the buffer,
 | 
			
		||||
        # split out everything except the last word.
 | 
			
		||||
        return boolean(output.split()[-1])  # pylint: disable=maybe-no-member
 | 
			
		||||
 | 
			
		||||
    def listdir(self, path, as_root=False, **kwargs):
 | 
			
		||||
        contents = self.execute('ls -1 {}'.format(path), as_root=as_root)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user