You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(package-list-parser): Make invalid packages log warning instead of throwing error (#1415)
* fixes#1414
* refactor(package-list-parser): Invalid packages will throw warning instead of error
* feat(package-list-parser): Make sure the scanned file is .txt
* test(package-list-parser): error to warning
r"package (.+) is not installed", output.stdout.decode("utf-8")
217
226
)
218
227
ifnot_installed_packages:
219
-
withErrorHandler(mode=error_mode):
220
-
raiseInvalidListError(
221
-
f"The packages {','.join(not_installed_packages)} seems to be not installed.\nIt is either an invalid package or not installed.\nUse `sudo yum install $(cat package-list)` to install all packages"
222
-
)
228
+
LOGGER.warning(
229
+
f"The packages {','.join(not_installed_packages)} seems to be not installed.\nIt is either an invalid package or not installed.\nUse `sudo yum install $(cat package-list)` to install all packages"
230
+
)
223
231
elifdistro.id() inPACMAN_DISTROS:
224
232
output=run(
225
233
["xargs", "-a", input_file, "pacman", "-Qk"],
@@ -233,10 +241,9 @@ def check_file(self):
233
241
)
234
242
235
243
ifnot_installed_packages:
236
-
withErrorHandler(mode=error_mode):
237
-
raiseInvalidListError(
238
-
f"The packages {','.join(not_installed_packages)} seems to be not installed.\nIt is either an invalid package or not installed.\nUse `sudo pacman -S $(cat package-list)` to install all packages"
239
-
)
244
+
LOGGER.warning(
245
+
f"The packages {','.join(not_installed_packages)} seems to be not installed.\nIt is either an invalid package or not installed.\nUse `sudo pacman -S $(cat package-list)` to install all packages"
246
+
)
240
247
else:
241
248
# TODO: Replace below error handling with a proper pip install dry run
0 commit comments