| 106 | print(f'[BINDERDB] Failed insert/update of service {str(e)}, {traceback.format_exc()}') |
| 107 | |
| 108 | def get_arg(connection, interface_id, ordering): |
| 109 | try: |
| 110 | cursor = connection.cursor() |
| 111 | select_data_query = "SELECT * from args WHERE interface_id = ? AND ordering = ?" |
| 112 | cursor.execute(select_data_query, (interface_id, ordering, )) |
| 113 | rows = cursor.fetchall() |
| 114 | if len(rows) == 0: |
| 115 | return None |
| 116 | r = rows[0] |
| 117 | a_id = r[0] |
| 118 | ordering = r[1] |
| 119 | argtype = r[2] |
| 120 | return Arg(argtype, db_id=a_id) |
| 121 | except Exception as e: |
| 122 | logging.error(f'[BINDERDB] Failed retrieving interface {str(e)}, {traceback.format_exc()}') |
| 123 | print(f'[BINDERDB] Failed retrieving interface {str(e)}, {traceback.format_exc()}') |
| 124 | |
| 125 | def get_args(connection, interface_id): |
| 126 | try: |