Commit d20e9c08 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by ntome

config: Reduce filesystem calls in AutoCleanConfig

parent d86f05b3
......@@ -25,8 +25,11 @@ class AutoCleanConfig(object):
def save(self):
if self.values:
super(AutoCleanConfig, self).save()
elif os.path.exists(self.path):
os.remove(self.path)
else:
try:
os.remove(self.path)
except OSError:
pass
class ForkingConfig(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment