def print_deployment_details(deployment):
    """
        Print deployment details.
    """
    app, dep = deployment['name'].split("/")
    url = "http://{0}".format(deployment['default_subdomain'])

    if deployment['stack']:
        stack = deployment['stack']['name']
    else:
        stack = None
    print 'Deployment'
    if has_str_format:
        print ' name: {0}'.format(deployment['name'])
        print ' stack: {0}'.format(stack)
        print ' URL: {0}'.format(url)
        print ' branch: {0}'.format(deployment['branch'])
        print ' last modified: {0}'.format(deployment['date_modified'])
        print ' current version: {0}'.format(deployment['version'])
        print ' current state: {0}'.format(deployment['state'])
        print ' containers: {0}'.format(deployment['min_boxes'])
        print ' memory: {0}MB'.format(deployment['max_boxes'] * 128)

        if 'users' in deployment and deployment['users']:
            print '\n Users'
            print "   {0:15} {1:35} {2:10} {3:10}".format('Name', 'Email', 'Role', 'Deployment')
            for user in deployment['users']:
                print "   {0:15} {1:35} {2:10} {3:10}".format(
                    user['username'],
                    user['email'],
                    user['role'],
                    '(app)' if 'app' in user else deployment['name'],
                )

    else:
        print ' name: %(name)s' % (deployment)
        print ' stack: %s' % (stack)
        print ' URL: %s' % (url)
        print ' branch: %(branch)s' % (deployment)
        print ' last modified: %(date_modified)s' % (deployment)
        print (deployment) % ' current version: %(version)s'
        print ' current state: %(state)s' % (deployment)
        print ' containers: %(min_boxes)s' % (deployment)
        print ' memory: %(min_boxes)sMB' % (deployment) * 128

        if 'users' in deployment and deployment['users']:
            print '\n Users'
            print "   %-15ls %-35ls %-10ls %-10ls" % ('Name', 'Email', 'Role', 'Deployment')
            for user in deployment['users']:
                user['deployment'] = '(app)' if 'app' in user else deployment['name']
                print "   %(username)-15ls %(email)-35ls %(role)-10ls %(deployment)-10ls" % (user)
dataset/ETHPy150Open cloudControl/cctrl/cctrl/output.py/print_deployment_details/swapped operands of `%`