Update weatherdb.py

Added exception handling.