Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVu5f-000338-2c for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Jun 2018 07:33:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fVu5d-0002MF-91 for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Jun 2018 07:33:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fVu5c-0002Ly-Sz for pgadmin-hackers@lists.postgresql.org; Thu, 21 Jun 2018 07:33:09 +0000 Received: from mail-pl0-x22a.google.com ([2607:f8b0:400e:c01::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fVu5V-0008BB-C0 for pgadmin-hackers@postgresql.org; Thu, 21 Jun 2018 07:33:07 +0000 Received: by mail-pl0-x22a.google.com with SMTP id 6-v6so1208396plb.0 for ; Thu, 21 Jun 2018 00:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=crYBGL1x3juwsm1+KFtyhOr3q5S8svg93Sll/nA8ywI=; b=qCMfc3YbQNUKVq/mWK3FJuvzwX6JpZd4C6PHu8QaEP2Fn9a1uSAPf8R+qMPVWNKeg1 6gn35+Y+oMpDjR6GMpkrDdYwIxQCu5xZprKUhzMS0au6BzsxPHmdCS9EBxNqJwB8F9LP RpDMfn3eW1fa/cQta8bnl9+GL3zjDK1VnceJnRrqQOM1qacGWUOngFe85oRsXuYtF6e1 kxt/gtTh97piwLhN3ed30kehSzj6rVi3ZN4MPPyr6gVNutJ1ysn0MwPn25O+vDnbNQj4 k8nMBdV/1skB1TPCL0cd/jMqhohs7UO0ErleaEqElXxnBacuqLonvb7YlYXr96ltzuJC 17Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=crYBGL1x3juwsm1+KFtyhOr3q5S8svg93Sll/nA8ywI=; b=VLys66J/ZFnQtAwBm/g9kDjCXP6k+GVgWCz4oe6IKoYTw08eTxB9iZ/QfhAVaH4tHV qtdQ+RMFFixmBZUTPcFnvBP6xbmSdq+JADREAZFPRwLjuQvirT58s6BzASP5Rtru5/n8 /P1x9LV8vvGhB2KLEOP2j8UAtJyuwQ+p9dpLsfSM0t9RpxFe7k9kfXAkVtKDfb/DM3qt 3dk1wVCyh7nMb+do2Ug/txtedvdbC/KJmUE63bmdNjgCJjpRvCXizrg6XebthnguRQk4 QSnpdnNT98o5gHslHJO8zOXrR05eso5AqHBUinUdT7l5kI9nXP8H5aQXbi0rW50hlhEH Q66w== X-Gm-Message-State: APt69E0tzH0Lsizz7RkiOkTxDsxY07pBCtxLHS3Vm5UnOFoSad7/FDze Axl/sgUl2ES6NwOjkgDMYpEMm3EYo5JH5lPSMaDV2g== X-Google-Smtp-Source: ADUXVKKY3/CKjypQvC0HsPPF81xW1Y0lBz5Nnu19wYEd8QYmYuXynNYi4EHU9VWuYmrmbOu3g+mZSEfmymDyzf0nkQ0= X-Received: by 2002:a17:902:103:: with SMTP id 3-v6mr27346991plb.229.1529566379581; Thu, 21 Jun 2018 00:32:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:8c86:0:0:0:0 with HTTP; Thu, 21 Jun 2018 00:32:58 -0700 (PDT) From: Akshay Joshi Date: Thu, 21 Jun 2018 13:02:58 +0530 Message-ID: Subject: [pgadmin4][Patch]: Fixed minor issue in auto discover server when entry is blank in the config file To: pgadmin-hackers Content-Type: multipart/mixed; boundary="000000000000b74b72056f21ec03" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b74b72056f21ec03 Content-Type: multipart/alternative; boundary="000000000000b74b6f056f21ec01" --000000000000b74b6f056f21ec01 Content-Type: text/plain; charset="UTF-8" Hi Hackers, I have found one minor issue in auto discovery logic. *getint* function of ConfigParser throws exception if the value of the parameter is blank in the config file. Example: *Port=* Because of that exception pgAdmin4 unable to discover all the valid servers. Attached is the patch to fix that. Please review it. -- *Akshay Joshi* *Sr. Software Architect * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --000000000000b74b6f056f21ec01 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

I have found one minor issu= e in auto discovery logic. getint=C2=A0function of ConfigParser throws exception if th= e value of the parameter is blank in the config file. Example:=C2=A0Port=3D= =C2=A0

Because of that exception pgAdm= in4 unable to discover all the valid servers. Attached is the patch to fix = that. Please review it.=C2=A0

--
Akshay Joshi
Sr= . Software Architect

<= /span>

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
--000000000000b74b6f056f21ec01-- --000000000000b74b72056f21ec03 Content-Type: application/octet-stream; name="Auto_discover_exception.patch" Content-Disposition: attachment; filename="Auto_discover_exception.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jio89wmf0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL19faW5pdF9fLnB5IGIvd2ViL3BnYWRtaW4vX19pbml0 X18ucHkKaW5kZXggNWNhZjYwNC4uZTRjOWM0OCAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vX19p bml0X18ucHkKKysrIGIvd2ViL3BnYWRtaW4vX19pbml0X18ucHkKQEAgLTUwOSw3ICs1MDksMTYg QEAgZGVmIGNyZWF0ZV9hcHAoYXBwX25hbWU9Tm9uZSk6CiAgICAgICAgICAgICAgICAgKToKICAg ICAgICAgICAgICAgICAgICAgc3ZyX25hbWUgPSByZWdpc3RyeS5nZXQoc2VjdGlvbiwgJ0Rlc2Ny aXB0aW9uJykKICAgICAgICAgICAgICAgICAgICAgc3ZyX3N1cGVydXNlciA9IHJlZ2lzdHJ5Lmdl dChzZWN0aW9uLCAnU3VwZXJ1c2VyJykKLSAgICAgICAgICAgICAgICAgICAgc3ZyX3BvcnQgPSBy ZWdpc3RyeS5nZXRpbnQoc2VjdGlvbiwgJ1BvcnQnKQorCisgICAgICAgICAgICAgICAgICAgICMg Z2V0aW50IGZ1bmN0aW9uIHRocm93cyBleGNlcHRpb24gaWYgdmFsdWUgaXMgYmxhbmsuCisgICAg ICAgICAgICAgICAgICAgICMgRXg6IFBvcnQ9CisgICAgICAgICAgICAgICAgICAgICMgSW4gc3Vj aCBjYXNlIHdlIHNob3VsZCBoYW5kbGUgdGhlIGV4Y2VwdGlvbiBhbmQgY29udGludWUKKyAgICAg ICAgICAgICAgICAgICAgIyB0byByZWFkIHRoZSBuZXh0IHNlY3Rpb24gb2YgdGhlIGNvbmZpZyBm aWxlLgorICAgICAgICAgICAgICAgICAgICB0cnk6CisgICAgICAgICAgICAgICAgICAgICAgICBz dnJfcG9ydCA9IHJlZ2lzdHJ5LmdldGludChzZWN0aW9uLCAnUG9ydCcpCisgICAgICAgICAgICAg ICAgICAgIGV4Y2VwdCBWYWx1ZUVycm9yOgorICAgICAgICAgICAgICAgICAgICAgICAgY29udGlu dWUKKwogICAgICAgICAgICAgICAgICAgICBzdnJfZGlzY292ZXJ5X2lkID0gc2VjdGlvbgogICAg ICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA9IHJlZ2lzdHJ5LmdldChzZWN0aW9uLCAnRGVz Y3JpcHRpb24nKQogICAgICAgICAgICAgICAgICAgICBkYXRhX2RpcmVjdG9yeSA9IHJlZ2lzdHJ5 LmdldChzZWN0aW9uLCAnRGF0YURpcmVjdG9yeScpCg== --000000000000b74b72056f21ec03--