Skip to content

Commit 94b6df9

Browse files
fix
1 parent 9998dc9 commit 94b6df9

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

upgrade_analysis/models/upgrade_analysis.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,17 +196,14 @@ def analyze(self):
196196
+ local_model_records
197197
}
198198
)
199-
if "base" in affected_modules:
200-
try:
201-
pass
202-
except ImportError:
203-
_logger.error(
204-
"You are using upgrade_analysis on core modules without "
205-
" having openupgrade_scripts module available."
206-
" The analysis process will not work properly,"
207-
" if you are generating analysis for the odoo modules"
208-
" in an openupgrade context."
209-
)
199+
if "base" not in affected_modules:
200+
_logger.error(
201+
"You are using upgrade_analysis on core modules without "
202+
" having openupgrade_scripts module available."
203+
" The analysis process will not work properly,"
204+
" if you are generating analysis for the odoo modules"
205+
" in an openupgrade context."
206+
)
210207

211208
# reorder and output the result
212209
modules = {
@@ -247,8 +244,8 @@ def analyze(self):
247244
if compare.module_map(key) not in modules:
248245
general_log += f"---Probably obsolete module {key}---\n" + contents
249246
continue
250-
if key not in modules:
251-
# no need to log in full log the merged/renamed modules
247+
if key not in modules or key in no_changes_modules:
248+
# no need to log in full log the merged/renamed/unchanged modules
252249
continue
253250
if self.write_files:
254251
error = self._write_file(key, modules[key].installed_version, contents)

0 commit comments

Comments
 (0)