diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-10-16 11:09:20 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-11-23 17:03:28 (GMT) |
commit | 414c31f93a9a826e43f1c6ad395e13d6c2db75fb (patch) | |
tree | 881e3f31dbfa2af3b07abec1e804998f3c2a03d1 | |
parent | eef130eb7dea522232c290bee7ab80042318ee66 (diff) |
maint-helper: rename parameter to avoid name clash with built-in function
Renaming license to license_name even makes the code slightly easier to
understand.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
-rwxr-xr-x | maint-helper.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/maint-helper.py b/maint-helper.py index 4f8a0be..8bd35ce 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -129,21 +129,21 @@ def cmd_build_snapshot(): print 'Done.' -def check_licenses(path, license, missing): +def check_licenses(path, license_name, missing): matchers = {'LGPL': 'GNU Lesser General Public License', 'GPL': 'GNU General Public License'} license_file = os.path.join(path, '.license') if os.path.isfile(license_file): f = open(license_file, 'r') - license = f.readline().strip() + license_name = f.readline().strip() f.close() for item in os.listdir(path): full_path = os.path.join(path, item) if os.path.isdir(full_path): - check_licenses(full_path, license, missing) + check_licenses(full_path, license_name, missing) else: check_source = is_source(item) @@ -158,7 +158,7 @@ def check_licenses(path, license, missing): f.close() miss_license = True - if source.find(matchers[license]) > 0: + if source.find(matchers[license_name]) > 0: miss_license = False # Special cases. @@ -166,9 +166,9 @@ def check_licenses(path, license, missing): miss_license = False if miss_license: - if license not in missing: - missing[license] = [] - missing[license].append(full_path) + if license_name not in missing: + missing[license_name] = [] + missing[license_name].append(full_path) def cmd_check_licenses(): |