diff --git a/web/pgadmin/misc/bgprocess/process_executor.py b/web/pgadmin/misc/bgprocess/process_executor.py index 3433f98..0a6f2fd 100644 --- a/web/pgadmin/misc/bgprocess/process_executor.py +++ b/web/pgadmin/misc/bgprocess/process_executor.py @@ -231,11 +231,11 @@ def update_status(**kw): import json if os.environ['OUTDIR']: - status = { - k: v for k, v in kw.items() if k in [ + status = dict( + (k, v) for k, v in kw.items() if k in [ 'start_time', 'end_time', 'exit_code', 'pid' ] - } + ) log('Updating the status:\n{0}'.format(json.dumps(status))) with open(os.path.join(os.environ['OUTDIR'], 'status'), 'w') as fp: json.dump(status, fp) diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py index a61844a..2cad508 100644 --- a/web/pgadmin/tools/sqleditor/__init__.py +++ b/web/pgadmin/tools/sqleditor/__init__.py @@ -470,11 +470,10 @@ def poll(trans_id): rows_affected = conn.rows_affected() for col in col_info: - items = list(col.items()) col_type = dict() - col_type['type_code'] = items[1][1] + col_type['type_code'] = col['type_code'] col_type['type_name'] = None - columns[items[0][1]] = col_type + columns[col['name']] = col_type # As we changed the transaction object we need to # restore it and update the session variable.