Subject: grant_wizard py3 bug

From: Seçkin Alan <[email-masked]>
Date: Wed, 13 Apr 2016 22:10:12 +0300

Hi,
I want the run pgadmin4 on python3, throw unquote module not found.

In python3 unquote method moved root to parse class

https://docs.python.org/3.4/library/urllib.parse.html#urllib.parse.unquote

Maybe isn't clear patch.

-- 
Seçkin ALAN
http://sckn.org
diff --git a/web/pgadmin/tools/grant_wizard/__init__.py b/web/pgadmin/tools/grant_wizard/__init__.py
index f53b979..4002e4e 100644
--- a/web/pgadmin/tools/grant_wizard/__init__.py
+++ b/web/pgadmin/tools/grant_wizard/__init__.py
@@ -20,7 +20,10 @@ from pgadmin.browser.server_groups.servers.utils import parse_priv_to_db
 from pgadmin.utils import PgAdminModule
 from flask import Response, url_for
 from flask.ext.security import login_required
-from urllib import unquote
+try:
+    from urllib import unquote
+except:
+    from urllib.parse import unquote
 from pgadmin.utils.ajax import precondition_required
 from functools import wraps
 from pgadmin.utils.preferences import Preferences

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

---

From: Ashesh Vashi <[email-masked]>
Date: Thu, 14 Apr 2016 11:55:13 +0530

Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>