Opened 11 years ago

Closed 11 years ago

#5194 closed defect (fixed)

update autotests to new style imports

Reported by: Kurt Schwehr Owned by: Kurt Schwehr
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: minor Keywords:
Cc:

Description (last modified by Kurt Schwehr)

Minor cleanup - update the imports in the autotest python files from:

import gdal
import ogr
import osr

to

from osgeo import gdal
from osgeo import ogr
from osgeo import osr

This pretty much does that:

find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import ogr$|from osgeo import ogr|"
find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import osr$|from osgeo import osr|"
find autotest -name \*.py  | xargs -n 1 perl -pi -e "s|^import gdal$|from osgeo import gdal|"

Change History (4)

comment:1 by Kurt Schwehr, 11 years ago

Description: modified (diff)
Owner: changed from warmerdam to Kurt Schwehr

comment:2 by Kurt Schwehr, 11 years ago

Status: newassigned
Version: unspecifiedsvn-trunk

any objections to this patch?

http://pastebin.com/G8LwEDNX

comment:3 by Even Rouault, 11 years ago

looks good. you can commit it

comment:4 by Kurt Schwehr, 11 years ago

Resolution: fixed
Status: assignedclosed

Changed on trunk: r26369

Note: See TracTickets for help on using tickets.