Enabled F821, H306, H402, and H404 flake8 rule

Reasons:
- F821 is disabled.
- H306 is disabled.
- H402 is disabled.
- H404 is disabled.

Changes:
- Updates tox.ini to enable F821, H306, H402 and H404 rules.
- Updates code for F821, H306, H402 and H404 violation.

Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
replaced e.message

BaseException.message has been deprecated as of Python 2.6.

http://legacy.python.org/dev/peps/pep-0352/

Replaced e.message with six.text_type(e) (uses unicode with
Python 2.x and str with Python 3.x).

Change-Id: I590749a1d05f39350996ec5ce5838b9c90baeb92
Merge "Enabled F821, H306, H402, and H404 flake8 rule"
Merge "replaced e.message"