diff --git a/util/config/provider/baseprovider.py b/util/config/provider/baseprovider.py index 97360d309..d3bea873e 100644 --- a/util/config/provider/baseprovider.py +++ b/util/config/provider/baseprovider.py @@ -80,7 +80,7 @@ class BaseProvider(object): """ Returns whether the file with the given name exists under the config override volume. """ raise NotImplementedError - def get_volume_file(self, filename): + def get_volume_file(self, filename, mode='r'): """ Returns a Python file referring to the given name under the config override volume. """ raise NotImplementedError diff --git a/util/config/provider/fileprovider.py b/util/config/provider/fileprovider.py index 3462eb7e2..099c5c3fd 100644 --- a/util/config/provider/fileprovider.py +++ b/util/config/provider/fileprovider.py @@ -49,8 +49,8 @@ class FileConfigProvider(BaseProvider): def volume_file_exists(self, filename): return os.path.exists(os.path.join(self.config_volume, filename)) - def get_volume_file(self, filename): - return open(os.path.join(self.config_volume, filename)) + def get_volume_file(self, filename, mode='r'): + return open(os.path.join(self.config_volume, filename), mode=mode) def write_volume_file(self, filename, contents): filepath = os.path.join(self.config_volume, filename)