Re: Fix key error

Поиск
Список
Период
Сортировка
От Surinder Kumar
Тема Re: Fix key error
Дата
Msg-id CAM5-9D9GhE4ZnG5xFZaAFoeZaDwC9YmNQLRmS0SL0tjJ1TJYBg@mail.gmail.com
обсуждение исходный текст
Ответ на Fix key error  (Dave Cramer <davecramer@gmail.com>)
Список pgadmin-hackers

Hi,

On Tue, Aug 8, 2017 at 12:23 AM, Dave Cramer <davecramer@gmail.com> wrote:

I don't think this line in web/pgadmin/browser/server_groups/servers/types.py does what it should.

default_path = config.DEFAULT_BINARY_PATHS[st.stype] or ""

will ever succeed if the key does not exist

Attached patch should work.

​It can be written as:

default_path = config.DEFAULT_BINARY_PATHS.get(st.stype, "")

Reference link

​Thanks for the patch.​


Dave Cramer

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Can someone tell me what this code does ?
Следующее
От: Ashesh Vashi
Дата:
Сообщение: Re: [pgAdmin4][Patch]: Allow user to cancel long running queries from dashboard