]> www.infradead.org Git - users/hch/nvmetcli.git/commit
nvmetcli: Correct xrange usage for py3
authorTony Asleson <tasleson@redhat.com>
Wed, 1 Apr 2020 19:13:16 +0000 (14:13 -0500)
committerChristoph Hellwig <hch@lst.de>
Fri, 3 Apr 2020 06:55:06 +0000 (08:55 +0200)
commit9da40b0433b8338f82c2c910b1057e1e1061b9a0
treededad83d1b21595c0bb7e4ed30806f9e186b2fc1
parent35e92a1bfedf28868112165892b3eb2cd7f750ce
nvmetcli: Correct xrange usage for py3

If you are in a namespace and simply do a 'create' without specifying
a value you will get:

/subsystems/n...f8/namespaces> create
name 'xrange' is not defined
subsystems/n...f8/namespaces>

This is because xrange is not defined in python3 as python3 changed
it to range.  As the code is already using six use six.move.xrange
which works for both python2 & python3.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
nvmet/nvme.py