Browse Source

dist: Fix error when using bam_model_extensions with bdist_apps

rdb 2 years ago
parent
commit
0cc3f8fbf6
1 changed files with 4 additions and 2 deletions
  1. 4 2
      direct/src/dist/commands.py

+ 4 - 2
direct/src/dist/commands.py

@@ -457,8 +457,10 @@ class build_apps(setuptools.Command):
         if self.bam_model_extensions:
             for ext in self.bam_model_extensions:
                 ext = '.' + ext.lstrip('.')
-                assert ext not in self.file_handlers, \
-                    'Extension {} occurs in both file_handlers and bam_model_extensions!'.format(ext)
+                handler = self.file_handlers.get(ext)
+                if handler != _model_to_bam:
+                    assert handler is None, \
+                        'Extension {} occurs in both file_handlers and bam_model_extensions!'.format(ext)
                 self.file_handlers[ext] = _model_to_bam
 
         tmp = self.default_file_handlers.copy()