-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
https://github.com/nexB/typecode/blob/main/src/typecode/magic2.py#L136
File "/Volumes/nexB/repos/scancode.io/lib/python3.10/site-packages/typecode/contenttype.py", line 32, in <module>
from typecode import magic2
File "/Volumes/nexB/repos/scancode.io/lib/python3.10/site-packages/typecode/magic2.py", line 378, in <module>
libmagic = load_lib()
File "/Volumes/nexB/repos/scancode.io/lib/python3.10/site-packages/typecode/magic2.py", line 174, in load_lib
failover_lib = load_lib_failover()
File "/Volumes/nexB/repos/scancode.io/lib/python3.10/site-packages/typecode/magic2.py", line 137, in load_lib_failover
platform = 'linux' if sys.platform.startswith('linux') else sys.platform
NameError: name 'sys' is not defined
Simply move the sys import @ https://github.com/nexB/typecode/blob/main/src/typecode/magic2.py#L55 outside the trace condition.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working