Skip to content

Commit b568d18

Browse files
authored
NodeSet: a few minor code fixes (#520)
From pylint: NodeSet.py:63:0: C0413: Import "from ClusterShell.Defaults import config_paths, DEFAULTS" should be placed at the top of the module (wrong-import-position) NodeSet.py:68:0: W0611: Unused RangeSetException imported from ClusterShell.RangeSet (unused-import) NodeSet.py:69:0: W0611: Unused RangeSetPaddingError imported from ClusterShell.RangeSet (unused-import)
1 parent 56a31e5 commit b568d18

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

lib/ClusterShell/NodeSet.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,20 @@
5454
import string
5555
import sys
5656

57-
# Python 3 compatibility
58-
try:
59-
basestring
60-
except NameError:
61-
basestring = str
62-
6357
from ClusterShell.Defaults import config_paths, DEFAULTS
6458
import ClusterShell.NodeUtils as NodeUtils
6559

6660
# Import all RangeSet module public objects
6761
from ClusterShell.RangeSet import RangeSet, RangeSetND, AUTOSTEP_DISABLED
68-
from ClusterShell.RangeSet import RangeSetException, RangeSetParseError
69-
from ClusterShell.RangeSet import RangeSetPaddingError
62+
from ClusterShell.RangeSet import RangeSetParseError
7063

7164

65+
# Python 3 compatibility
66+
try:
67+
basestring
68+
except NameError:
69+
basestring = str
70+
7271
# Define default GroupResolver object used by NodeSet
7372
DEF_GROUPS_CONFIGS = config_paths('groups.conf')
7473
ILLEGAL_GROUP_CHARS = set("@,!&^*")

0 commit comments

Comments
 (0)