]> www.infradead.org Git - users/hch/nvmetcli.git/commitdiff
nvmet: fix attribute listing
authorChristoph Hellwig <hch@lst.de>
Sun, 3 Apr 2016 15:45:02 +0000 (17:45 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 3 Apr 2016 15:45:02 +0000 (17:45 +0200)
We only want to split at the first underscore, not at any.

Signed-off-by: Christoph Hellwig <hch@lst.de>
nvmet/nvme.py

index 0d6cdbd92da93c5517075a6fef539461f62d6a2f..c25d23781b17bdf90c422d1334620e8d78a8ff69 100644 (file)
@@ -106,7 +106,7 @@ class CFSNode(object):
         '''
         self._check_self()
 
-        names = [os.path.basename(name).split('_')[1]
+        names = [os.path.basename(name).split('_', 1)[1]
                  for name in glob("%s/%s_*" % (self._path, group))
                      if os.path.isfile(name)]