@@ -126,6 +126,9 @@ def add(self, key, value):
126
126
value = list (set (current ))
127
127
self ._settings [key ] = value
128
128
self .change_validate (key , value )
129
+ logger .warning (
130
+ "Warning: Check with shpc config edit - ordering of list can change."
131
+ )
129
132
130
133
def remove (self , key , value ):
131
134
"""
@@ -139,6 +142,9 @@ def remove(self, key, value):
139
142
current .pop (current .index (value ))
140
143
self ._settings [key ] = current
141
144
self .change_validate (key , current )
145
+ logger .warning (
146
+ "Warning: Check with shpc config edit - ordering of list can change."
147
+ )
142
148
143
149
def set (self , key , value ):
144
150
"""
@@ -206,13 +212,8 @@ def save(self, filename=None):
206
212
logger .exit ("A filename is required to save to." )
207
213
yaml = YAML ()
208
214
209
- # This requires Python 3.7 support
210
- try :
211
- with open (filename , "w" ) as fd :
212
- yaml .dump (self ._settings , fd , sort_keys = False )
213
- except :
214
- with open (filename , "w" ) as fd :
215
- yaml .dump (self ._settings , fd )
215
+ with open (filename , "w" ) as fd :
216
+ yaml .dump (self ._settings , fd )
216
217
217
218
def __iter__ (self ):
218
219
for key , value in self .__dict__ .items ():
0 commit comments