Changeset 103326 in vbox
- Timestamp:
- Feb 13, 2024 12:53:57 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/common/vboxapisetup.py
r103325 r103326 151 151 return True 152 152 153 ## @todo r=bird: This is supposed to be publicly visible? 153 154 def findModulePathHelper(sModule = 'vboxapi', asDirs = None): 154 155 """ … … 161 162 for sPath in asDirs: 162 163 if g_fVerbose: 163 print('Searching for "%s" in path "%s" ...' % (sModule, sPath)) 164 ## @todo r=bird: WOW. We read the directory and then look for a filename in the returned list?!? Case sensitively. 165 ## What about: 166 ## if g_fVerbose: # drop this 167 ## print(os.listdir(sPath)); 168 ## sCandiate = os.path.join(sPath, sModule); 169 ## if os.path.exists(sCandiate): 170 ## return sCandiate; 171 if os.path.isdir(sPath): 172 asDirEntries = os.listdir(sPath) 173 if g_fVerbose: 174 print(asDirEntries) 175 if sModule in asDirEntries: 176 return os.path.join(sPath, sModule) 164 print('Searching for "%s" in "%s" ...' % (sModule, sPath)) 165 try: print(os.listdir(sPath)); 166 except: pass; 167 sCandiate = os.path.join(sPath, sModule); 168 if os.path.exists(sCandiate): 169 return sCandiate; 177 170 return None 178 171 172 ## @todo r=bird: This is supposed to be publicly visible? 179 173 def findModulePath(sModule = 'vboxapi'): 180 174 """
Note:
See TracChangeset
for help on using the changeset viewer.