~mysql/mysql-utilities/1.6

« back to all changes in this revision

Viewing changes to mysql/utilities/common/ip_parser.py

  • Committer: chuck.bell at oracle
  • Date: 2014-12-05 15:00:19 UTC
  • mfrom: (488.1.1 mu-1.6.1-b19031182)
  • Revision ID: chuck.bell@oracle.com-20141205150019-enxhq2j2gdylzhx9
Tagged for release to SysQA

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
    ssl_ca = None
318
318
    ssl_cert = None
319
319
    ssl_key = None
 
320
    ssl = None
320
321
 
321
322
    # Split on the '@' to determine the connection string format.
322
323
    # The user/password may have the '@' character, split by last occurrence.
479
480
                ssl_ca = config_path_data.get('ssl-ca', None)
480
481
                ssl_cert = config_path_data.get('ssl-cert', None)
481
482
                ssl_key = config_path_data.get('ssl-key', None)
 
483
                ssl = config_path_data.get('ssl', None)
482
484
 
483
485
        else:
484
486
            if login_path and not config_path:
534
536
    if isinstance(options, dict):
535
537
        charset = options.get("charset", None)
536
538
        # If one SSL option was found before, not mix with those in options.
537
 
        if not ssl_cert and not ssl_ca and not ssl_key:
 
539
        if not ssl_cert and not ssl_ca and not ssl_key and not ssl:
538
540
            ssl_cert = options.get("ssl_cert", None)
539
541
            ssl_ca = options.get("ssl_ca", None)
540
542
            ssl_key = options.get("ssl_key", None)
 
543
            ssl = options.get("ssl", None)
541
544
 
542
545
    else:
543
546
        # options is an instance of optparse.Values
546
549
        except AttributeError:
547
550
            charset = None
548
551
        # If one SSL option was found before, not mix with those in options.
549
 
        if not ssl_cert and not ssl_ca and not ssl_key:
 
552
        if not ssl_cert and not ssl_ca and not ssl_key and not ssl:
550
553
            try:
551
554
                ssl_cert = options.ssl_cert  # pylint: disable=E1103
552
555
            except AttributeError:
559
562
                ssl_key = options.ssl_key  # pylint: disable=E1103
560
563
            except AttributeError:
561
564
                ssl_key = None
 
565
            try:
 
566
                ssl = options.ssl  # pylint: disable=E1103
 
567
            except AttributeError:
 
568
                ssl = None
562
569
 
563
570
    # Set parsed connection values
564
571
    connection = {
576
583
        connection["ssl_ca"] = ssl_ca
577
584
    if ssl_key:
578
585
        connection["ssl_key"] = ssl_key
 
586
    if ssl:
 
587
        connection["ssl"] = ssl
579
588
    # Handle optional parameters. They are only stored in the dict if
580
589
    # they were provided in the specifier.
581
590
    if socket is not None and os.name == "posix":