Skip to content

Commit

Permalink
apps: Fix watch-appstream.py error handling
Browse files Browse the repository at this point in the history
cockpit.spawn() never fails with a bare "closed". There are no expected
failures there, so just always warn about them.
  • Loading branch information
martinpitt committed Dec 19, 2024
1 parent dd81c26 commit 1c88f3a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions pkg/apps/appstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ export function get_metainfo_db() {
debug("read metainfo_db:", metainfo_db);
}
})
.fail(function (error) {
if (error != "closed") {
console.warn(error);
}
});
.catch(error => console.warn("watch-appstream.py failed:", error));
}

return metainfo_db;
Expand Down
1 change: 0 additions & 1 deletion test/common/typecheck
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ javascript_ignored_codes = [
"TS2551", # Property 'X' does not exist on type
"TS2304", # Cannot find name 'X'
"TS2305", # Module '"./machines/machines"' has no exported member 'get_init_superuser_for_options'.
"TS2367", # This comparison appears to be unintentional because the types 'Error' and 'string' have no overlap.
"TS2538", # Type 'null' cannot be used as an index type.
"TS2559", # Type 'never[]' has no properties in common with type 'DBusCallOptions'.
"TS2769", # No overload matches this call.
Expand Down

0 comments on commit 1c88f3a

Please sign in to comment.