X-Git-Url: http://users.mur.at/ms/git/gitweb/?p=OpenColorIO-Configs.git;a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Fprocess.py;h=76dd754389909215b44aa9d9a8810b6d34040974;hp=8312ccdcbbcfea77024198b8f17a23bc59162dbc;hb=918520c7cc16aa549e2af0f57b630905063bad19;hpb=60684f6e3f158e136f5ad0f92cd6bd3d464a32a4 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