diff options
Diffstat (limited to 'openstack/common/fileutils.py')
-rw-r--r-- | openstack/common/fileutils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/openstack/common/fileutils.py b/openstack/common/fileutils.py index 0c967da..9f8807f 100644 --- a/openstack/common/fileutils.py +++ b/openstack/common/fileutils.py @@ -96,3 +96,15 @@ def remove_path_on_error(path): except Exception: with excutils.save_and_reraise_exception(): delete_if_exists(path) + + +def file_open(*args, **kwargs): + """Open file + + see built-in file() documentation for more details + + Note: The reason this is kept in a separate module is to easily + be able to provide a stub module that doesn't alter system + state at all (for unit tests) + """ + return file(*args, **kwargs) |