Skip to content
Permalink
Browse files

python3 print

QGIS would not build with the old print statements
  • Loading branch information
fnorf authored and m-kuhn committed Dec 16, 2016
1 parent 9c1638f commit 0c894d78fcc1f1c1e6db99a199130d0e41bc4516
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/plugins/grass/scripts/db.connect-login.pg.py
@@ -106,20 +106,20 @@ def main():

# Unfortunately we cannot test untill user/password is set
if user or password:
print "Setting login (db.login) ... "
print("Setting login (db.login) ... ")
sys.stdout.flush()
if grass.run_command('db.login', driver="pg", database=conn, user=user, password=password) != 0:
grass.fatal("Cannot login")

# Try to connect
print "Testing connection ..."
print("Testing connection ...")
sys.stdout.flush()
if grass.run_command('db.select', quiet=True, flags='c', driver="pg", database=conn, sql="select version()") != 0:
if user or password:
print "Deleting login (db.login) ..."
print("Deleting login (db.login) ...")
sys.stdout.flush()
if grass.run_command('db.login', quiet=True, driver="pg", database=conn, user="", password="") != 0:
print "Cannot delete login."
print("Cannot delete login.")
sys.stdout.flush()
grass.fatal("Cannot connect to database.")

0 comments on commit 0c894d7

Please sign in to comment.
You can’t perform that action at this time.