File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from pathlib import Path
2+ import sys
23from selenium .common .exceptions import TimeoutException
34
45# pycharm complains that build_assets is an unresolved ref
@@ -11,8 +12,7 @@ def main():
1112 args = arg_getters .get_selenium_runner_args ()
1213 new_icons = filehandler .find_new_icons (args .devicon_json_path , args .icomoon_json_path )
1314 if len (new_icons ) == 0 :
14- print ("No files need to be uploaded. Ending script..." )
15- return
15+ sys .exit ("No files need to be uploaded. Ending script..." )
1616
1717 # print list of new icons
1818 print ("List of new icons:" , * new_icons , sep = "\n " )
@@ -32,10 +32,11 @@ def main():
3232 filehandler .rename_extracted_files (args .download_path )
3333 print ("Task completed." )
3434 except TimeoutException as e :
35- print (e )
36- print (e .stacktrace )
35+ sys .exit ("Selenium Time Out Error: \n " + e )
36+ except Exception as e :
37+ sys .exit (e )
3738 finally :
38- runner .close ()
39+ runner .close ()
3940
4041
4142if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ def main():
3838 runner .upload_svgs (svgs , screenshot_folder )
3939 print ("Task completed." )
4040 except TimeoutException as e :
41- print ("Selenium Time Out Error: " , e . stacktrace , sep = ' \n ' )
41+ sys . exit ("Selenium Time Out Error: \n " + e )
4242 except Exception as e :
43- print (e )
43+ sys . exit (e )
4444 finally :
45- runner .close ()
45+ runner .close ()
4646
4747
4848def find_object_added_in_this_pr (icons : List [dict ], pr_title : str ):
You can’t perform that action at this time.
0 commit comments