Skip to content

Commit f8a5063

Browse files
committedJun 3, 2024
Fix pre-commit issues
Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 7e5e86d commit f8a5063

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed
 

‎show_all_imagestreams.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import json
2626
import os
27+
import sys
2728

2829
from pathlib import Path
2930
from typing import Dict, Any
@@ -32,18 +33,13 @@
3233

3334

3435
class ShowAllImageStreams(object):
35-
version: str = ""
36-
37-
def __init__(self):
38-
pass
39-
4036
def load_json_file(self, filename: Path) -> Any:
4137
with open(str(filename)) as f:
4238
data = json.load(f)
4339
isinstance(data, Dict)
4440
return data
4541

46-
def show_all_imagestreams(self):
42+
def show_all_imagestreams(self) -> int:
4743
p = Path(".")
4844
json_files = p.glob(f"{IMAGESTREAMS_DIR}/*.json")
4945
if not json_files:
@@ -57,8 +53,9 @@ def show_all_imagestreams(self):
5753
print(f"Tags in the image stream {f}:")
5854
for tag in json_dict["spec"]["tags"]:
5955
print(f"- {tag['name']} -> {tag['from']['name']}")
56+
return 0
6057

6158

6259
if __name__ == "__main__":
6360
isc = ShowAllImageStreams()
64-
isc.show_all_imagestreams()
61+
sys.exit(isc.show_all_imagestreams())

0 commit comments

Comments
 (0)
Please sign in to comment.