public inbox for [email protected]  
help / color / mirror / Atom feed
From: Surinder Kumar <[email protected]>
To: Dave Page <[email protected]>
Cc: Murtuza Zabuawala <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: PATCH: Python2.6 compatibility fixes (pgAdmin4)
Date: Fri, 9 Sep 2016 18:23:34 +0530
Message-ID: <CAM5-9D8HqnVfK6DTv=HXAmSNPq8iBP4x-57RAGQtk9juqncdWA@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoy0W9Lzj3G44u_eCcHRG8m2L3U0Y5FwZv+X5juuomASkA@mail.gmail.com>
References: <CAKKotZSL4MNp21DUNrUBkh7u2CbhhPpqKhPHVcXjLgfWe-iycA@mail.gmail.com>
	<CAKKotZRczSbfyQoezz9kgF3_FfCQ6i5vhbPUOface8i5U-axng@mail.gmail.com>
	<CA+OCxoy0W9Lzj3G44u_eCcHRG8m2L3U0Y5FwZv+X5juuomASkA@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

*Please find attached patch with following fix:*

1) While running pgAdmin4 with latest git pull on Windows x64 environment,
I got an exception on terminal console,

> NameError
> NameError: global name 'arch_keys' is not defined​


*​Issue:​* arch_keys was defined inside the method add_server, but used
outside the method.

I have handled this issue in attached patch.

On Tue, Sep 6, 2016 at 6:52 PM, Dave Page <[email protected]> wrote:

> Thanks, patch applied.
>
> On Tue, Sep 6, 2016 at 12:08 PM, Murtuza Zabuawala
> <[email protected]> wrote:
> > +++ Adding related RM.
> >
> > RM#1636 & RM#1659
> >
> > --
> > Regards,
> > Murtuza Zabuawala
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > On Tue, Sep 6, 2016 at 4:36 PM, Murtuza Zabuawala
> > <[email protected]> wrote:
> >>
> >> Hi,
> >>
> >> PFA minor patch for Python2.6 compatibility with pgAdmin4.
> >> Please review.
> >>
> >>
> >> Regards,
> >> Murtuza Zabuawala
> >> EnterpriseDB: http://www.enterprisedb.com
> >> The Enterprise PostgreSQL Company
> >
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/octet-stream] py_26_fix.patch (842B, 3-py_26_fix.patch)
  download | inline diff:
diff --git a/web/pgadmin/__init__.py b/web/pgadmin/__init__.py
index 23c1489..d988172 100644
--- a/web/pgadmin/__init__.py
+++ b/web/pgadmin/__init__.py
@@ -247,7 +247,6 @@ def create_app(app_name=config.APP_NAME):
         '''Add a server to the config database'''
         def add_server(user_id, servergroup_id, name, superuser, port, discovery_id, comment):
         # Create a server object if needed, and store it.
-            arch_keys = set()
             servers = Server.query.filter_by(
                 user_id=user_id,
                 discovery_id=svr_discovery_id
@@ -272,6 +271,7 @@ def create_app(app_name=config.APP_NAME):

         # Figure out what servers are present
         if winreg is not None:
+            arch_keys = set()
             proc_arch = os.environ['PROCESSOR_ARCHITECTURE'].lower()

             try:


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: PATCH: Python2.6 compatibility fixes (pgAdmin4)
  In-Reply-To: <CAM5-9D8HqnVfK6DTv=HXAmSNPq8iBP4x-57RAGQtk9juqncdWA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox