Skip to content

Commit

Permalink
Fix linter, add check for non-existent tag file
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Jan 27, 2025
1 parent 9db4651 commit e42a7eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/spec_xml/generate_spec_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import contextlib
import glob
import json
import os
Expand All @@ -24,7 +25,7 @@

import click
from chip.testing.spec_parsing import build_xml_clusters
from paths import get_chip_root, get_documentation_file_path, get_in_progress_defines
from paths import get_chip_root, get_documentation_file_path

CURRENT_IN_PROGRESS_DEFINES = [
"cameras",
Expand Down Expand Up @@ -263,7 +264,8 @@ def dump_versions(scraper, spec_root, output_dir, legacy):
output.write(f'{tag[0].split("/")[-1]}\n')
else:
print(f"WARNING: no tag found for sha {sha}")
os.remove(tag_file)
with contextlib.suppress(FileNotFoundError):
os.remove(tag_file)

scraper_file = os.path.abspath(os.path.join(output_dir, 'scraper_version'))
version_cmd = 'version'
Expand Down

0 comments on commit e42a7eb

Please sign in to comment.