Skip to content

Commit

Permalink
Simplify exception re-raising.
Browse files Browse the repository at this point in the history
Works on Python 2.5 and 3.
(ArcGIS 9.3 still uses Python 2.5 by default)
  • Loading branch information
Brian Sutherland committed May 14, 2012
1 parent b3ea97d commit 2b3b235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kartograph/options.py
Expand Up @@ -227,8 +227,8 @@ def parse_bounds(opts):
data[i] = float(data[i])
else:
raise Error('bounds mode bbox requires array with exactly 4 values [lon0,lat0,lon1,lat]')
except Error as err:
raise err
except Error:
raise
except:
raise Error('bounds mode bbox requires array with exactly 4 values [lon0,lat0,lon1,lat]')
elif mode == "points":
Expand All @@ -239,8 +239,8 @@ def parse_bounds(opts):
pt = map(float, pt)
else:
raise Error('bounds mode points requires array with (lon,lat) tuples')
except Error as err:
raise err
except Error:
raise
except:
raise Error('bounds mode points requires array with (lon,lat) tuples')
elif mode in ("polygons", "polygon"):
Expand Down

0 comments on commit 2b3b235

Please sign in to comment.