~juju-deployers/juju-deployer/trunk

« back to all changes in this revision

Viewing changes to deployer/service.py

  • Committer: mergebot at canonical
  • Author(s): "Barry Price"
  • Date: 2020-10-16 09:19:58 UTC
  • mfrom: (218.1.3 juju-deployer)
  • Revision ID: mergebot@juju-139df4-prod-is-toolbox-0.canonical.com-20201016091958-njorz8f4iyblxv75
Fix PEP8/Flake8 errors

Reviewed-on: https://code.launchpad.net/~barryprice/juju-deployer/resolve-pep8-failures/+merge/392359
Reviewed-by: Benjamin Allot <benjamin.allot@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        unit_names = list(svc_units.keys())
129
129
        unit_names.sort(key=lambda unit: int(unit.split('/')[1]))
130
130
        machine = (
131
 
            svc_units[unit_names[int(u_idx)]].get('Machine') or
132
 
            svc_units[unit_names[int(u_idx)]].get('machine')
 
131
            svc_units[unit_names[int(u_idx)]].get('Machine') or svc_units[unit_names[int(u_idx)]].get('machine')
133
132
        )
134
133
        if not machine:
135
134
            self.deployment.log.warning(
273
272
            return
274
273
 
275
274
        self.service.svc_data['to'] = (
276
 
            unit_mapping +
277
 
            list(itertools.repeat(
278
 
                unit_mapping[-1], unit_count - len(unit_mapping)))
 
275
            unit_mapping + list(itertools.repeat(
 
276
                unit_mapping[-1], unit_count - len(unit_mapping))
 
277
            )
279
278
        )
280
279
        unit_mapping = self.service.unit_placement
281
280