Skip to content

Commit

Permalink
BUG: Fix omnicache path check for None and remove from Settings (#79)
Browse files Browse the repository at this point in the history
Make release 0.11.1
  • Loading branch information
spbrogan committed Oct 11, 2019
1 parent dc85969 commit dff8a17
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
18 changes: 5 additions & 13 deletions edk2toolext/invocables/edk2_ci_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ def GetWorkspaceRoot(self):
''' get WorkspacePath '''
raise NotImplementedError()

def GetOmnicachePath(self):
''' Optionally point to omnicache path '''
pass

def AddCommandLineOptions(self, parserObj):
''' Implement in subclass to add command line options to the argparser '''
pass
Expand Down Expand Up @@ -75,9 +71,12 @@ def AddCommandLineOptions(self, parser):
def RetrieveCommandLineOptions(self, args):
''' Retrieve command line options from the argparser '''
self.git_ignore = args.git_ignore
self.omnicache_path = args.omnicache_path
self.git_force = args.git_force
self.git_update = args.git_update
self.omnicache_path = args.omnicache_path
if (self.omnicache_path is not None) and (not os.path.exists(self.omnicache_path)):
logging.warning(f"Omnicache path set to invalid path: {args.omnicache_Path}")
self.omnicache_path = None

super().RetrieveCommandLineOptions(args)

Expand All @@ -92,18 +91,11 @@ def GetLoggingFileName(self, loggerType):
return "CISETUP"

def Go(self):
# Parse command line arguments

omnicache_path = self.omnicache_path
try:
omnicache_path = self.PlatformSettings.GetOmnicachePath()
except:
pass

ret = repo_resolver.resolve_all(self.GetWorkspaceRoot(),
self.PlatformSettings.GetDependencies(),
ignore=self.git_ignore, force=self.git_force,
update_ok=self.git_update, omnicache_dir=omnicache_path)
update_ok=self.git_update, omnicache_dir=self.omnicache_path)

logging.info(f"Repo resolver resolved {ret}")

Expand Down
4 changes: 2 additions & 2 deletions edk2toolext/invocables/edk2_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def RetrieveCommandLineOptions(self, args):
''' Retrieve command line options from the argparser '''
self.force_it = args.force
self.omnicache_path = args.omnicache_path
if (not os.path.exists(self.omnicache_path)):
logging.warning(f"Omnicahe path invalid: {args.omnicache_Path}")
if (self.omnicache_path is not None) and (not os.path.exists(self.omnicache_path)):
logging.warning(f"Omnicache path set to invalid path: {args.omnicache_Path}")
self.omnicache_path = None

super().RetrieveCommandLineOptions(args)
Expand Down
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ NOTE: It is strongly recommended that you use python virtual environments. Virt

## Release Version History

## Version 0.11.1

* Bugs
* Issue 80 - Omnicache path check causes failure when not set

### Version 0.11.0

* Features:
Expand Down

0 comments on commit dff8a17

Please sign in to comment.