X-Git-Url: http://users.mur.at/ms/git/gitweb/?a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Fprocess.py;h=76dd754389909215b44aa9d9a8810b6d34040974;hb=529f7b361204176430ea0df642e4ec00a5c54ad7;hp=8312ccdcbbcfea77024198b8f17a23bc59162dbc;hpb=d59b8b0469e13eb63a4e531269777c276b414407;p=OpenColorIO-Configs.git diff --git a/aces_1.0.0/python/aces_ocio/process.py b/aces_1.0.0/python/aces_ocio/process.py index 8312ccd..76dd754 100755 --- a/aces_1.0.0/python/aces_ocio/process.py +++ b/aces_1.0.0/python/aces_ocio/process.py @@ -41,9 +41,13 @@ def read_text(text_file): Return value description. """ - if text_file != '': - with open(text_file, 'rb') as fp: - text = (fp.read()) + # TODO: Investigate if check is needed. + if not text_file: + return + + with open(text_file, 'rb') as fp: + text = (fp.read()) + return text @@ -62,9 +66,13 @@ def write_text(text, text_file): Return value description. """ - if text_file != '': - with open(text_file, 'wb') as fp: - fp.write(text) + # TODO: Investigate if check is needed. + if not text_file: + return + + with open(text_file, 'wb') as fp: + fp.write(text) + return text