json parsing error when /etc/utah/config is empty

Bug #1075620 reported by Javier Collado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UTAH
Fix Released
High
Javier Collado

Bug Description

Using the latest revision of the code in the dev branch, I get the following problem when running run_utah_tests.py

  File "/usr/lib/python2.7/dist-packages/utah/config.py", line
    CONFIG.update(json.load(open(myfile)))
  File "/usr/lib/python2.7/json/__init__.py", line 280, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 328, in load
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 365, in decod
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_d
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

The problem is because /etc/utah/config is empty and the json library fails to parse the empty string.

Related branches

Changed in utah:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Javier Collado (javier.collado)
status: Confirmed → Triaged
Changed in utah:
status: Triaged → In Progress
Changed in utah:
status: In Progress → Fix Committed
Changed in utah:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.