From 9f7eaca80d259201844f097fec24d1e9fe9fb5e3 Mon Sep 17 00:00:00 2001 From: Stanislaw Pitucha Date: Thu, 13 Jun 2013 13:57:15 +0000 Subject: Remove trivial cases of unused variables (1) Kill some of the variables marked as unused by flakes8. This should allow to enable F841 check in the future. Only trivial cases with no function calls and obviously pure functions (like datetime.now(), or len()) are cleaned up here. Part 1, split to reduce conflicts. Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8 --- nova/db/sqlalchemy/migrate_repo/versions/186_new_bdm_format.py | 3 --- nova/db/sqlalchemy/utils.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/migrate_repo/versions/186_new_bdm_format.py b/nova/db/sqlalchemy/migrate_repo/versions/186_new_bdm_format.py index 88462a2c8..e8b9a1570 100644 --- a/nova/db/sqlalchemy/migrate_repo/versions/186_new_bdm_format.py +++ b/nova/db/sqlalchemy/migrate_repo/versions/186_new_bdm_format.py @@ -111,9 +111,6 @@ def _upgrade_bdm_v2(meta, bdm_table, bdm_shadow_table): _bdm_rows_v1 = ('id', 'device_name', 'virtual_name', 'snapshot_id', 'volume_id', 'instance_uuid') - _bdm_rows_v2 = ('id', 'source_type', 'destination_type', 'guest_format', - 'device_type', 'disk_bus', 'boot_index', 'image_id') - _instance_cols = ('uuid', 'image_ref', 'root_device_name') def _get_columns(table, names): diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py index 7430fefdd..a429f1dfe 100644 --- a/nova/db/sqlalchemy/utils.py +++ b/nova/db/sqlalchemy/utils.py @@ -70,7 +70,7 @@ def visit_insert_from_select(element, compiler, **kw): def _get_not_supported_column(col_name_col_instance, column_name): try: column = col_name_col_instance[column_name] - except Exception as e: + except Exception: msg = _("Please specify column %s in col_name_col_instance " "param. It is required because column has unsupported " "type by sqlite).") -- cgit