6 Commits

Author SHA1 Message Date
Sean Gillies
5fea5210a0 Improved env implementation and tests. 2016-04-28 15:26:55 -06:00
Sean Gillies
12f8fc7e3f New, lazier AWS sessions
New Env class and tests.
More logging, tests, safer environment
Remove usage (deprecated) of rasterio.drivers()
Also pep8 cleanups throughout the tests and a fix for unchecked
dtypes when opening a dataset in 'w' mode.
Now we can simply import warnings in __init__.py. In the
deprecations tests, we needed to see a single warning only one
time to avoid multiple drivers() warnings.
Add a global env.
Add rasterio.env.setenv()
2016-04-28 15:26:55 -06:00
Sean Gillies
400027592a Check msg in a way that passes for all GDAL versions 2016-03-29 11:31:14 -06:00
Sean Gillies
659e4e48ab No longer raise exceptions in __exit__
That went counter to the design of the context manager. Instead
I've added a check() method that is to be called after any GDAL
function that might have called CPLError().
2016-03-24 16:28:14 -06:00
Sean Gillies
d96dbe9f56 Test str repr of exception 2016-03-24 10:09:26 -06:00
Sean Gillies
fdc6baab46 Switch to new try/with/except/finally structure
Also restructure the errors raised from cpl_errs.

Closes #600
2016-03-23 22:17:42 -06:00