Pete Zaitcev fec5d068a0 Fix crash with -l, -d /, and pseudo folders
Using -l, -d /, or a pseduo folder by itself works fine, but if you
combine all of them, this happens:

[zaitcev@guren s]$ swift list -d / testcont
amazon_lili.jpg
pseudodir/
rin_shibuya_pixiv.jpg
swift-c134855-5a.diff
[zaitcev@guren s]$ swift list -d / -l testcont
      151954 2014-06-20 17:13:52 amazon_lili.jpg
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 1301, in main
    globals()['st_%s' % args[0]](parser, argv[1:], output)
  File "/q/zaitcev/hail/python-swiftclient-tip/swiftclient/shell.py", line 414, in st_list
    total_bytes += item_bytes
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'

The patch is a straightforward fix that assigns expected variables.

Change-Id: If24dcc2491e8b8982455107d2aca30c0491a398a
Closes-Bug: 1399678
2015-02-18 19:46:41 -07:00
..
2014-05-26 14:35:03 +02:00
2014-07-11 13:05:22 -07:00