Comment 2 for bug 1699985

Revision history for this message
Saurabh jangir (sjopenstack) wrote :

swift version is : python-swiftclient 3.3.0

Issue is: when we provide wrong input type to below command. The exception is not handled appropriately.Please find the command output below.

[root@localhost swift]# swift-ring-builder account.builder create 10 3 a
Traceback (most recent call last):
  File "/usr/bin/swift-ring-builder", line 24, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/swift/cli/ringbuilder.py", line 1287, in main
    getattr(Commands, command, Commands.unknown)()
  File "/usr/lib/python2.7/site-packages/swift/cli/ringbuilder.py", line 446, in create
    builder = RingBuilder(int(argv[3]), float(argv[4]), int(argv[5]))
ValueError: invalid literal for int() with base 10: 'a'

Successful run is :-
[root@localhost swift]# swift-ring-builder account.builder create 10 3 1
[root@localhost swift]#