Commit bd3d26ea authored by Hoek, Steven's avatar Hoek, Steven
Browse files

Earlier supplied code example did not stop where it was supposed to ...

parent bfd8fc74
......@@ -31,7 +31,8 @@ The classes found in the formats subdirectory more or less have the same interfa
*Example*::
from formats.asciigrid import AsciiGrid
import sys
myraster = None
try:
fn = 'myraster.asc'
......@@ -44,7 +45,7 @@ The classes found in the formats subdirectory more or less have the same interfa
for k in range(myraster.ncols):
if line[k] == 42:
print('Found!')
break
sys.exit()
finally:
if myraster is not None:
myraster.close()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment