Skip to content

Commit

Permalink
fix: ability setup session args to None
Browse files Browse the repository at this point in the history
  • Loading branch information
horw committed Nov 24, 2023
1 parent 732606c commit 26abc25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion idf_build_apps/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def _process_sdkconfig_files(self):
except OSError:
pass

if self.session_args.override_sdkconfig_items:
if self.session_args and self.session_args.override_sdkconfig_items:
res.append(self.session_args.override_sdkconfig_file_path)
if 'CONFIG_IDF_TARGET' in self.session_args.override_sdkconfig_items:
self._sdkconfig_files_defined_target = self.session_args.override_sdkconfig_items['CONFIG_IDF_TARGET']
Expand Down
4 changes: 2 additions & 2 deletions idf_build_apps/session_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ def _create_override_sdkconfig_merged_file(self, override_sdkconfig_merged_items
_session_args: t.Optional[SessionArgs] = None


def get_session_args() -> SessionArgs:
def get_session_args() -> t.Optional[SessionArgs]:
global _session_args
if _session_args is None:
raise Exception('SessionArgs have not been set up yet.')
warnings.warn('SessionArgs have not been set up yet.')
return _session_args


Expand Down

0 comments on commit 26abc25

Please sign in to comment.