Trivial typos not affecting behavior.
Clean up some Python use of deprecated raise "string"
remove unnecessary Python imports of exceptions
Add EOL to end of script.
Merge pull request #1119 from mtbc/trac-2581-dev

Various code cleanup, mostly Python exceptions (rebase)