Commits

ViktorHaag committed 4607e19

except should catch 'ValueError' not 'Value'

  • Participants
  • Parent commits bbdb5fd

Comments (0)

Files changed (1)

File httpdomain/sphinxcontrib/httpdomain.py

         try:
             code, status = re.split(r'\s', text.strip(), 1)
             code = int(code)
-        except Value:
+        except ValueError:
             msg = inliner.reporter.error(
                 'HTTP status code must be an integer (e.g. `200`) or '
                 'start with an integer (e.g. `200 OK`); %r is invalid' %