我的python模块中有4个函数-1,2,3,4,每个函数都执行一个插入stmt,我希望只有在前一个函数成功结束时才执行后续函数..
我该怎么做?
代码.py
def main():
func1()
func2()
func3()
func4()
def func1():
try:
insert into table1
catch:
database.error as e
def func2():
try:
insert into table2
catch:
database.error as e