From 48d67eb8a5804cd9cabf0a22c3f421502b983b24 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Thu, 15 Jan 2015 21:20:23 +0100 Subject: [PATCH] Change comparison with "None". --- aces_1.0.0/python/aces_ocio/generateLUT.py | 4 ++-- aces_1.0.0/python/aces_ocio/process.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aces_1.0.0/python/aces_ocio/generateLUT.py b/aces_1.0.0/python/aces_ocio/generateLUT.py index df3cbed..53f86e1 100644 --- a/aces_1.0.0/python/aces_ocio/generateLUT.py +++ b/aces_1.0.0/python/aces_ocio/generateLUT.py @@ -131,7 +131,7 @@ def generate1dLUTFromImage(ramp1dPath, Return value description. """ - if outputPath == None: + if outputPath is None: outputPath = ramp1dPath + ".spi1d" # open image @@ -196,7 +196,7 @@ def generate3dLUTFromImage(ramp3dPath, outputPath=None, resolution=32): Return value description. """ - if outputPath == None: + if outputPath is None: outputPath = ramp3dPath + ".spi3d" args = ["--extract", diff --git a/aces_1.0.0/python/aces_ocio/process.py b/aces_1.0.0/python/aces_ocio/process.py index 24fb940..527db13 100755 --- a/aces_1.0.0/python/aces_ocio/process.py +++ b/aces_1.0.0/python/aces_ocio/process.py @@ -190,7 +190,7 @@ class Process: except: try: user = os.getenv("USERNAME") - if user == None: + if user is None: user = os.getenv("USER") except: user = "unknown_user" @@ -438,7 +438,7 @@ class Process: # This is now used to ensure that the process has finished line = "" - while line != None and process.poll() == None: + while line != None and process.poll() is None: try: line = process.stdout.readline() except: @@ -724,7 +724,7 @@ def main(): argsStart = len(sys.argv) + 1 args = [] - if cmd == None: + if cmd is None: print("process: No command specified") # -- 1.7.10.4