swift-account-audit displays AttributeError stacktrace on 404

Bug #1266636 reported by clayg on 2014-01-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Undecided
Roman Vasilets

Bug Description

It's not that bad, but when an object response gives a 404, there's a bit of traceback:

      Bad status HEADing object "/AUTH_test/ँ툎댎᠂툐蔉㜃툎᠄툎᠂鐉/嘇᠂☃ऀ툏蔊㜄ं嘆᠃鐋ः᠁鐉" on 127.0.0.1/sdb1
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/eventlet/greenpool.py", line 80, in _spawn_n_impl
        func(*args, **kwargs)
      File "/mnt/workspace/swift/bin/swift-account-audit", line 134, in audit_object
        if resp.getheader('ETag').strip('"') != hash:
    AttributeError: 'NoneType' object has no attribute 'strip'

I just ran functests, rm -fr /srv/node1/sdb1/, and swift-account-audit AUTH_test on my saio.

Also the usage example could probably use an update to drop the SOSO reference, and maybe convert opt parsing to optparse.

Kun Huang (academicgareth) wrote :

I think we could add a directory, for example bin_script, at <swift-repo>/test/ to prevent some tiny mistakes like this.

Changed in swift:
assignee: nobody → Daisuke Matsui (nanodayo)
Filippo Giunchedi (filippo) wrote :

same here, confirmed

Changed in swift:
assignee: Daisuke Matsui (nanodayo) → nobody
Changed in swift:
assignee: nobody → Roman Vasilets (rvasilets)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers