Tracebake if deleting a glob

Bug #1915575 reported by Pete Zaitcev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

A possibly misguided attempt to try a glob syntax causes a traceback:

[zaitcev@suzdal tests]$ PYTHONPATH=/q/zaitcev/hail/python-swiftclient-tip /q/zaitcev/hail/python-swiftclient-tip/bin/swift -V 3 -A https://rhev-a24c-01.os.lab.eng.bos.redhat.com:35357/v3 -U ksuserten:ksuser -K *** delete shardcont1 '16*'
Traceback (most recent call last):
  File "/q/zaitcev/hail/python-swiftclient-tip/bin/swift", line 24, in <module>
    sys.exit(main())
  File "/q/zaitcev/hail/python-swiftclient-tip/swiftclient/shell.py", line 1971, in main
    globals()['st_%s' % args[0]](parser, argv[1:], output)
  File "/q/zaitcev/hail/python-swiftclient-tip/swiftclient/shell.py", line 173, in st_delete
    if r.get('attempts') > 1 else '')
TypeError: '>' not supported between instances of 'NoneType' and 'int'
[zaitcev@suzdal tests]$

This happens on trunk, release tag 3.8.1.

If globbing is not supported, we ought to report a better error. Something like "not supported" would work. But I'll take "16* is not found", too.

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.