Browse Source

scipt:db add python3 support

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65789 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 9 năm trước cách đây
mục cha
commit
881b80ff40
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      lib/python/script/db.py

+ 4 - 4
lib/python/script/db.py

@@ -18,9 +18,9 @@ for details.
 .. sectionauthor:: Glynn Clements
 .. sectionauthor:: Glynn Clements
 .. sectionauthor:: Martin Landa <landa.martin gmail.com>
 .. sectionauthor:: Martin Landa <landa.martin gmail.com>
 """
 """
-
-from core import *
-from utils import try_remove
+from __future__ import absolute_import
+from .core import *
+from .utils import try_remove
 from grass.exceptions import CalledModuleError
 from grass.exceptions import CalledModuleError
 
 
 
 
@@ -110,7 +110,7 @@ def db_connection(force=False):
     if not conn and force:
     if not conn and force:
         run_command('db.connect', flags='c')
         run_command('db.connect', flags='c')
         conn = parse_command('db.connect', flags='g')
         conn = parse_command('db.connect', flags='g')
-    
+
     return conn
     return conn
 
 
 def db_select(sql=None, filename=None, table=None, **args):
 def db_select(sql=None, filename=None, table=None, **args):