Skip to content

Commit

Permalink
FIX old exception syntax
Browse files Browse the repository at this point in the history
DOC add to release notes
  • Loading branch information
hayd committed Jan 29, 2014
1 parent 89ad14d commit 4e150c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Bug Fixes
- Possible segfault when chained indexing with an object array under numpy 1.7.1 (:issue:`6026`, :issue:`6056`)
- Bug in setting using fancy indexing a single element with a non-scalar (e.g. a list),
(:issue:`6043`)
- ``to_sql`` did not respect ``if_exists`` (:issue:`4110` :issue:`4304`)
- Regression in ``.get(None)`` indexing from 0.12 (:issue:`5652`)
- Subtle ``iloc`` indexing bug, surfaced in (:issue:`6059`)
- Bug with insert of strings into DatetimeIndex (:issue:`5818`)
Expand Down
4 changes: 2 additions & 2 deletions pandas/io/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def write_frame(frame, name, con, flavor='sqlite', if_exists='fail', **kwargs):
if_exists = 'fail'

if if_exists not in ('fail', 'replace', 'append'):
raise ValueError, "'%s' is not valid for if_exists" % if_exists
raise ValueError("'%s' is not valid for if_exists" % if_exists)

exists = table_exists(name, con, flavor)
if if_exists == 'fail' and exists:
Expand All @@ -212,7 +212,7 @@ def write_frame(frame, name, con, flavor='sqlite', if_exists='fail', **kwargs):
create = None
if exists:
if if_exists == 'fail':
raise ValueError, "Table '%s' already exists." % name
raise ValueError("Table '%s' already exists." % name)
elif if_exists == 'replace':
cur = con.cursor()
cur.execute("DROP TABLE %s;" % name)
Expand Down

0 comments on commit 4e150c7

Please sign in to comment.