Minor updates and bug fixes.
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / process.py
index 8312ccd..5758b5e 100755 (executable)
@@ -41,9 +41,13 @@ def read_text(text_file):
          Return value description.\r
     """\r
 \r
-    if text_file != '':\r
-        with open(text_file, 'rb') as fp:\r
-            text = (fp.read())\r
+    # TODO: Investigate if check is needed.\r
+    if not text_file:\r
+        return\r
+\r
+    with open(text_file, 'rb') as fp:\r
+        text = (fp.read())\r
+\r
     return text\r
 \r
 \r
@@ -62,9 +66,13 @@ def write_text(text, text_file):
          Return value description.\r
     """\r
 \r
-    if text_file != '':\r
-        with open(text_file, 'wb') as fp:\r
-            fp.write(text)\r
+    # TODO: Investigate if check is needed.\r
+    if not text_file:\r
+        return\r
+\r
+    with open(text_file, 'wb') as fp:\r
+        fp.write(text)\r
+\r
     return text\r
 \r
 \r
@@ -323,7 +331,7 @@ class Process:
                 log_handle.write(header)\r
                 if format == 'xml':\r
                     log_handle.write(']]>\n')\r
-            self.write_log(log_handle)\r
+            self.write_log(log_handle, format=format)\r
             log_handle.close()\r
 \r
     def log_line(self, line):\r