Skip to content

Commit f551f97

Browse files
authored
Merge pull request #99 from fosslight/window
Change the exit code to a constant for windows
2 parents 893c03d + b5a3689 commit f551f97

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/fosslight_prechecker/_precheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def run_lint(target_path, disable, output_file_name, format='', need_log_file=Tr
237237
global _turn_on_default_reuse_config, _check_only_file_mode, _start_time
238238

239239
file_to_check_list = []
240-
_exit_code = os.EX_OK
240+
_exit_code = 0
241241
path_to_find = ""
242242
report = ProjectReport()
243243
result_item = ResultItem()

src/fosslight_prechecker/_result.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
RULE_LINK = "https://oss.lge.com/guide/process/osc_process/1-identification/copyright_license_rule.html"
2323
MSG_REFERENCE = "Ref. Copyright and License Writing Rules in Source Code. : " + RULE_LINK
2424
MSG_FOLLOW_LIC_TXT = "Follow the Copyright and License Writing Rules in Source Code. : " + RULE_LINK
25-
25+
EX_IOERR = 74
2626
logger = logging.getLogger(constant.LOGGER_NAME)
2727

2828

@@ -151,7 +151,7 @@ def write_result_xml(result_file: str, exit_code: int, result_item: ResultItem,
151151
success = True
152152
except Exception as ex:
153153
logger.error(f"Error_to_write_xml: {ex}")
154-
exit_code = os.EX_IOERR
154+
exit_code = EX_IOERR
155155
return success, exit_code
156156

157157

@@ -166,7 +166,7 @@ def write_result_html(result_file: str, exit_code: int, result_item: ResultItem,
166166
success = True
167167
except Exception as ex:
168168
logger.error(f"Error_to_write_html: {ex}")
169-
exit_code = os.EX_IOERR
169+
exit_code = EX_IOERR
170170
return success, exit_code
171171

172172

@@ -182,7 +182,7 @@ def write_result_yaml(result_file: str, exit_code: int, result_item: ResultItem)
182182
success = True
183183
except Exception as ex:
184184
logger.error(f"Error_to_write_yaml: {ex}")
185-
exit_code = os.EX_IOERR
185+
exit_code = EX_IOERR
186186
return success, exit_code
187187

188188

0 commit comments

Comments
 (0)