Lazyload toml only when it's actually needed to simplify boring dependencies issues

This commit is contained in:
Alexandre Aubin 2022-12-21 20:28:51 +01:00
parent 935a984e95
commit bd6ad626d9

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf8 -*- # -*- coding: utf8 -*-
import toml
import sys import sys
import os import os
import re import re
@ -1505,6 +1504,7 @@ class Manifest(TestSuite):
self.raw_manifest, object_pairs_hook=check_for_duplicate_keys self.raw_manifest, object_pairs_hook=check_for_duplicate_keys
) )
else: else:
import toml
self.manifest = toml.loads(self.raw_manifest) self.manifest = toml.loads(self.raw_manifest)
except Exception as e: except Exception as e:
print( print(