Revision 9f6eb417 snf-cyclades-app/synnefo/ui/views.py

b/snf-cyclades-app/synnefo/ui/views.py
411 411
    # rdp param is set, the user requested rdp file
412 412
    # check if we are on windows
413 413
    if operating_system == 'windows' and request.GET.get("rdp", False):
414

  
414
        extra_rdp_content = ''
415 415
        # UI sent domain info (from vm metadata) use this
416 416
        # otherwise use our default snf-<vm_id> domain
417 417
        EXTRA_RDP_CONTENT = getattr(settings, 'UI_EXTRA_RDP_CONTENT', '')
......
419 419
            extra_rdp_content = EXTRA_RDP_CONTENT(server_id, ip_address,
420 420
                                                  hostname, username)
421 421
        else:
422
            extra_rdp_content = EXTRA_RDP_CONTENT % \
423
                {
424
                    'server_id': server_id,
425
                    'ip_address': ip_address,
426
                    'hostname': hostname,
427
                    'user': username
428
                  }
422
            if EXTRA_RDP_CONTENT:
423
                extra_rdp_content = EXTRA_RDP_CONTENT % \
424
                    {
425
                        'server_id': server_id,
426
                        'ip_address': ip_address,
427
                        'hostname': hostname,
428
                        'user': username
429
                      }
429 430

  
430 431
        rdp_context = {
431 432
            'username': username,

Also available in: Unified diff