Commit e4f8a58
committed
RangeSet: accept unicode strings on Python 2
On Python 2, isinstance(x, str) excludes unicode: a unicode pattern
gave an empty RangeSet and a unicode vector raised ValueError in
RangeSetND. Check basestring instead of str. No-op on Python 3.
Signed-off-by: Stephane Thiell <sthiell@stanford.edu>1 parent 8755d96 commit e4f8a58Copy full SHA for e4f8a58
3 files changed
+38-7Lines changed: 38 additions & 7 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib/ClusterShell
- tests
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/ClusterShell/RangeSet.py
Copy file name to clipboardExpand all lines: lib/ClusterShell/RangeSet.py+7-7Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
129 | 129 | |
130 | 130 | |
131 | 131 | |
132 | | - |
| 132 | + |
133 | 133 | |
134 | 134 | |
135 | 135 | |
| ||
138 | 138 | |
139 | 139 | |
140 | 140 | |
141 | | - |
| 141 | + |
142 | 142 | |
143 | 143 | |
144 | 144 | |
| ||
809 | 809 | |
810 | 810 | |
811 | 811 | |
812 | | - |
| 812 | + |
813 | 813 | |
814 | 814 | |
815 | 815 | |
| ||
839 | 839 | |
840 | 840 | |
841 | 841 | |
842 | | - |
| 842 | + |
843 | 843 | |
844 | 844 | |
845 | 845 | |
| ||
856 | 856 | |
857 | 857 | |
858 | 858 | |
859 | | - |
| 859 | + |
860 | 860 | |
861 | 861 | |
862 | 862 | |
| ||
874 | 874 | |
875 | 875 | |
876 | 876 | |
877 | | - |
| 877 | + |
878 | 878 | |
879 | 879 | |
880 | 880 | |
| ||
934 | 934 | |
935 | 935 | |
936 | 936 | |
937 | | - |
| 937 | + |
938 | 938 | |
939 | 939 | |
940 | 940 | |
|
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
42 | 42 | |
43 | 43 | |
44 | 44 | |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
45 | 51 | |
46 | 52 | |
47 | 53 | |
|
Collapse file
+25Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
32 | 38 | |
33 | 39 | |
34 | 40 | |
| ||
644 | 650 | |
645 | 651 | |
646 | 652 | |
| 653 | + |
| 654 | + |
| 655 | + |
| 656 | + |
| 657 | + |
647 | 658 | |
648 | 659 | |
649 | 660 | |
| ||
695 | 706 | |
696 | 707 | |
697 | 708 | |
| 709 | + |
| 710 | + |
| 711 | + |
| 712 | + |
| 713 | + |
| 714 | + |
| 715 | + |
698 | 716 | |
699 | 717 | |
700 | 718 | |
| ||
708 | 726 | |
709 | 727 | |
710 | 728 | |
| 729 | + |
| 730 | + |
| 731 | + |
| 732 | + |
| 733 | + |
| 734 | + |
| 735 | + |
711 | 736 | |
712 | 737 | |
713 | 738 | |
|
0 commit comments