mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 00:17:37 +08:00
fix: catch OSError when running subprocess
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## 3.1.10 (2022-04-18)
|
## 3.1.10 (2022-04-18)
|
||||||
|
|
||||||
- fix #1249: catch exceptions when requesting with disabling allow_redirects
|
- fix #1249: catch exceptions when requesting with disabling allow_redirects
|
||||||
|
- fix: catch OSError when running subprocess
|
||||||
|
|
||||||
## 3.1.9 (2022-04-17)
|
## 3.1.9 (2022-04-17)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -172,7 +172,7 @@ def format_pytest_with_black(*python_paths: Text):
|
|||||||
capture_exception(ex)
|
capture_exception(ex)
|
||||||
logger.error(ex)
|
logger.error(ex)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except FileNotFoundError:
|
except OSError:
|
||||||
err_msg = """
|
err_msg = """
|
||||||
missing dependency tool: black
|
missing dependency tool: black
|
||||||
install black manually and try again:
|
install black manually and try again:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ def create_scaffold(project_name):
|
|||||||
print(f"\n$ tree {prj_name} -a")
|
print(f"\n$ tree {prj_name} -a")
|
||||||
subprocess.run(["tree", prj_name, "-a"])
|
subprocess.run(["tree", prj_name, "-a"])
|
||||||
print("")
|
print("")
|
||||||
except FileNotFoundError:
|
except OSError:
|
||||||
logger.warning("tree command not exists, ignore.")
|
logger.warning("tree command not exists, ignore.")
|
||||||
|
|
||||||
if os.path.isdir(project_name):
|
if os.path.isdir(project_name):
|
||||||
|
|||||||
Reference in New Issue
Block a user