Merge remote-tracking branch 'telmich/master'
This commit is contained in:
commit
04af96b5e3
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ class FileList(collections.MutableSequence):
|
||||||
|
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index):
|
||||||
return self.__read()[index]
|
return self.__read()[index]
|
||||||
|
|
||||||
def __setitem__(self, index, value):
|
def __setitem__(self, index, value):
|
||||||
lines = self.__read()
|
lines = self.__read()
|
||||||
lines[index] = value
|
lines[index] = value
|
||||||
|
@ -134,7 +134,7 @@ class DirectoryDict(collections.MutableMapping):
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(self.path, key), "w") as fd:
|
with open(os.path.join(self.path, key), "w") as fd:
|
||||||
fd.write(str(value))
|
fd.write(str(value))
|
||||||
except EnvironmentError as e:
|
except EnvironmentError as e:
|
||||||
raise cdist.Error(str(e))
|
raise cdist.Error(str(e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue