py3: replace has_key usage
This commit is contained in:
parent
d8546b580d
commit
24e71e88e5
|
@ -23,7 +23,7 @@ def smart_cleaning(files_path):
|
|||
project_files = {}
|
||||
for file_path in files_path:
|
||||
project_name = os.path.basename(file_path).split('_')[0]
|
||||
if not project_files.has_key(project_name):
|
||||
if projet_name not in project_files:
|
||||
project_files[project_name] = []
|
||||
project_files[project_name].append(file_path)
|
||||
|
||||
|
@ -365,13 +365,13 @@ def send_packages(dist, arch, project, package, last_tag):
|
|||
if new_version > old_version and \
|
||||
project['current_tag'] == project['version']:
|
||||
print("New tag detected : %s" % project['current_tag'])
|
||||
if settings.MANUAL_TESTING_REPOSITORIES.has_key(package['source_name']):
|
||||
if package['source_name'] in settings.MANUAL_TESTING_REPOSITORIES:
|
||||
package_repos = settings.MANUAL_TESTING_REPOSITORIES[package['source_name']]
|
||||
else:
|
||||
package_repos = settings.DEFAULT_TESTING_REPOSITORIES
|
||||
packages = package['names'] + [package['source_name']]
|
||||
packages = " ".join(packages)
|
||||
if package_repos.has_key(dist) and package['copy_in_testing']:
|
||||
if dist in package_repos and package['copy_in_testing']:
|
||||
for repo in package_repos[dist]:
|
||||
print("+ Copy %s packages to %s repository (%s)" % (package['source_name'], repo, dist))
|
||||
call('ssh root@%s "/usr/bin/reprepro -b /var/vhosts/deb.entrouvert.org copy %s %s %s"'\
|
||||
|
|
Loading…
Reference in New Issue