Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-1679

[python] HOME location of file-based connection configuration does not point to HOME location

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.6.0.B1
    • 2.5.0.B2
    • amqp-python-client
    • None
    • Hide

      Run Qpid Proton Python client with connect.json file in the HOME location (~/.config/messaging).

      Show
      Run Qpid Proton Python client with connect.json file in the HOME location ( ~/.config/messaging ).
    • Yorba

      def _find_config_file():
          confname = 'connect.json'
          confpath = ['.', '~/.config/messaging','/etc/messaging']
          for d in confpath:
              f = os.path.join(d, confname)
              if os.path.isfile(f):
                  return f
          return None
      

      os.path.isfile does not expand tilde (~) as HOME directory, but as directory named tilde (~) in current location.

      There should be probably something like:
      os.path.isfile(os.path.expanduser(f))

              rkubis_kafka_devexp Radim Kubis
              rkubis_kafka_devexp Radim Kubis
              Radim Kubis Radim Kubis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: