aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/swap_repository.py
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2015-02-14 11:26:46 +0100
committerSergio Ahumada <sahumada@texla.cl>2015-03-10 12:28:45 +0000
commit3cde3fb39489e8e9b4319d69031f27a2d113cc39 (patch)
treeb887d6c0741e6edc5f70e2516fcf00b49a0e9db5 /packaging-tools/swap_repository.py
parenta2f7d382886120158329dba152c23b523159b938 (diff)
Clean up unused variables and imports
* remove unused imports * remove unused variables * replace unused variables with 'dummy', this is the suggested and most common way to deal with variables that need to be defined but are never used and it also makes pylint not to complain, eg: for root, dir, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, '*.pro'): filename = os.path.join(root, basename) since 'dirs' is never used, we replace it with 'dummy' for root, dummy, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, '*.pro'): filename = os.path.join(root, basename) Change-Id: I850c2c2a8ae60035d0cc5bf6c3429ff8640f9f11 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Diffstat (limited to 'packaging-tools/swap_repository.py')
-rw-r--r--packaging-tools/swap_repository.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging-tools/swap_repository.py b/packaging-tools/swap_repository.py
index ad9572e85..1289afb6d 100644
--- a/packaging-tools/swap_repository.py
+++ b/packaging-tools/swap_repository.py
@@ -86,7 +86,7 @@ def parse_cmd_line_args():
###############################
def get_directory_list(base_dir, search_match):
matches = []
- for root, dirs, files in os.walk(base_dir):
+ for root, dirs, dummy in os.walk(base_dir):
for basename in dirs:
if basename == search_match:
fulldirname = os.path.join(root, basename)