Remove unused "try / except" clauses.
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / aces_config.py
index 42b2409..26493ba 100755 (executable)
@@ -447,7 +447,7 @@ def add_look(config,
     # Add this colorspace into the main list of colorspaces
     config_data['colorSpaces'].append(colorspace)
 
-    print('')
+    print()
 
 
 def integrate_looks_into_views(config,
@@ -548,7 +548,7 @@ def create_config(config_data,
                   aliases=False,
                   prefix=False,
                   multiple_displays=False,
-                  look_info=[],
+                  look_info=None,
                   custom_lut_dir=None):
     """
     Object description.
@@ -564,6 +564,9 @@ def create_config(config_data,
          Return value description.
     """
 
+    if look_info is None:
+        look_info = []
+
     prefixed_names = {}
     alias_colorspaces = []
 
@@ -605,21 +608,21 @@ def create_config(config_data,
 
     # Add alias
     if aliases:
-        if reference_data.aliases != []:
+        if reference_data.aliases:
             # add_colorspace_alias(config, reference_data,
             #                     reference_data, reference_data.aliases)
             # defer adding alias colorspaces until end. Helps with some applications
             alias_colorspaces.append(
                 [reference_data, reference_data, reference_data.aliases])
 
-    print('')
+    print()
 
     # print( 'color spaces : %s' % [x.name for x in sorted(config_data['colorSpaces'])])
 
     #
     # Add Looks and Look colorspaces
     #
-    if look_info != []:
+    if look_info:
         print('Adding looks')
 
         config_data['looks'] = []
@@ -640,7 +643,7 @@ def create_config(config_data,
                                    config_data,
                                    multiple_displays)
 
-        print('')
+        print()
 
     print('Adding the regular color spaces')
 
@@ -691,16 +694,16 @@ def create_config(config_data,
         # Add alias to normal colorspace, using compact name
         #
         if aliases:
-            if colorspace.aliases != []:
+            if colorspace.aliases:
                 # add_colorspace_alias(config, reference_data,
                 #                     colorspace, colorspace.aliases)
                 # defer adding alias colorspaces until end. Helps with some applications
                 alias_colorspaces.append(
                     [reference_data, colorspace, colorspace.aliases])
 
-        print('')
+        print()
 
-    print('')
+    print()
 
     #
     # We add roles early so we can create alias colorspaces with the names of the roles
@@ -780,7 +783,7 @@ def create_config(config_data,
                 add_colorspace_aliases(config, reference_data, role_colorspace, [role_name], 'Roles')
         """
 
-    print('')
+    print()
 
     # We add these at the end as some applications use the order of the colorspaces
     # definitions in the config to order the colorspaces in their selection lists.
@@ -790,7 +793,7 @@ def create_config(config_data,
     for reference, colorspace, aliases in alias_colorspaces:
         add_colorspace_aliases(config, reference, colorspace, aliases)
 
-    print('')
+    print()
 
     print('Adding the diplays and views')
 
@@ -934,7 +937,7 @@ def create_config(config_data,
     config.setActiveDisplays(','.join(sorted(displays)))
     config.setActiveViews(','.join(views))
 
-    print('')
+    print()
 
     # Make sure we didn't create a bad config
     config.sanityCheck()
@@ -1306,7 +1309,7 @@ def create_ACES_config(aces_ctl_directory,
                        lut_resolution_3d=64,
                        bake_secondary_LUTs=True,
                        multiple_displays=False,
-                       look_info=[],
+                       look_info=None,
                        copy_custom_luts=True,
                        cleanup=True,
                        prefix_colorspaces_with_family_names=True):
@@ -1324,6 +1327,9 @@ def create_ACES_config(aces_ctl_directory,
          Return value description.
     """
 
+    if look_info is None:
+        look_info = []
+
     # Directory for custom LUTs
     custom_lut_dir = None
     if copy_custom_luts:
@@ -1473,14 +1479,6 @@ def main():
 
     print(look_info)
 
-    # TODO: Investigate the following statements.
-    try:
-        args_start = sys.argv.index('--') + 1
-        args = sys.argv[args_start:]
-    except:
-        args_start = len(sys.argv) + 1
-        args = []
-
     print('command line : \n%s\n' % ' '.join(sys.argv))
 
     assert aces_ctl_directory is not None, (