diff --git a/src/interfaces/python/pg.py b/src/interfaces/python/pg.py
index 6f458af5aa873f2b64a8a92974c81b562b17388c..189ac112202a5ba120505d8754a82359002b181b 100644
--- a/src/interfaces/python/pg.py
+++ b/src/interfaces/python/pg.py
@@ -38,7 +38,7 @@ def _quote(d, t):
 	if t in ('inet', 'cidr') and d == '': return "NULL"
 
 	return "'%s'" % string.strip(re.sub("'", "''", \
-							 re.sub("\\\\", "\\\\\\\\", "%s" %d)))
+							 re.sub("\\\\", "\\\\\\\\", "%s" % d)))
 
 class DB:
 	"""This class wraps the pg connection type"""