yserial
yserial copied to clipboard
cur will be undefined if ysql.connect fails
https://github.com/rsvp/yserial/blob/e7f752754fae9ef0059fc7d988392a96cb95f12a/y_serial_dev.py#L570
not sure of the best way to fix this but maybe:
if 'cur' in locals():
cur.close()
@glennra hi Glen, the fallbacks will be corrected when yserial gets rewritten for python3 using better flow constructs.
Thanks for your attention in the matter.
Other than the current issue, are there any critical fails when you run the code against python2 ?
Yes, in 0.60 there was an issue with error reporting that I fixed in my copy. I will have to look it up. I'll create a new issue if the problem still exists.