ん〜...
with connection.cursor() as cursor: try: cursor.execute(sql) connection.commit() except Exception as e: if(e.args[0] == TABLE_EXISTS_ERROR): return print(str(e)) print(traceback.format_exc()) exit(1)
ん〜...
with connection.cursor() as cursor: try: cursor.execute(sql) connection.commit() except Exception as e: if(e.args[0] == TABLE_EXISTS_ERROR): return print(str(e)) print(traceback.format_exc()) exit(1)
re.compile(pattern).match(text)とかして唸るなど。