mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 00:52:08 +00:00 
			
		
		
		
	Getters: Renamed import from __base_filepath to _base_filepath
				
					
				
			Previously trying to use the `__base_filepath` import from inside the `Package` class, resulted in the error "`_Package__base_filepath` is not defined."
This commit is contained in:
		@@ -31,7 +31,7 @@ import requests
 | 
			
		||||
 | 
			
		||||
from devlib.utils.android import ApkInfo
 | 
			
		||||
 | 
			
		||||
from wa import Parameter, settings, __file__ as __base_filepath
 | 
			
		||||
from wa import Parameter, settings, __file__ as _base_filepath
 | 
			
		||||
from wa.framework.resource import ResourceGetter, SourcePriority, NO_ONE 
 | 
			
		||||
from wa.framework.exception import ResourceError
 | 
			
		||||
from wa.utils.misc import (ensure_directory_exists as _d, 
 | 
			
		||||
@@ -96,7 +96,7 @@ class Package(ResourceGetter):
 | 
			
		||||
 | 
			
		||||
    def get(self, resource):
 | 
			
		||||
        if resource.owner == NO_ONE:
 | 
			
		||||
            basepath = os.path.join(os.path.dirname(__base_filepath), 'assets')
 | 
			
		||||
            basepath = os.path.join(os.path.dirname(_base_filepath), 'assets')
 | 
			
		||||
        else:
 | 
			
		||||
            modname = resource.owner.__module__
 | 
			
		||||
            basepath  = os.path.dirname(sys.modules[modname].__file__)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user