mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Fix path of device tree on HassOS add on (#8764)
* fix device tree path for HassOS * fix symlink call * fix formatting
This commit is contained in:
		
							parent
							
								
									fef6a7ca74
								
							
						
					
					
						commit
						27cf1cdf15
					
				@ -42,6 +42,11 @@ class Rknn(DetectionApi):
 | 
				
			|||||||
    type_key = DETECTOR_KEY
 | 
					    type_key = DETECTOR_KEY
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, config: RknnDetectorConfig):
 | 
					    def __init__(self, config: RknnDetectorConfig):
 | 
				
			||||||
 | 
					        # create symlink for Home Assistant add on
 | 
				
			||||||
 | 
					        if not os.path.isfile("/proc/device-tree/compatible"):
 | 
				
			||||||
 | 
					            if os.path.isfile("/device-tree/compatible"):
 | 
				
			||||||
 | 
					                os.symlink("/device-tree/compatible", "/proc/device-tree/compatible")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # find out SoC
 | 
					        # find out SoC
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            with open("/proc/device-tree/compatible") as file:
 | 
					            with open("/proc/device-tree/compatible") as file:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user