Skip to content

Commit

Permalink
Move winreg import to local import to avoid import errors on non-wind…
Browse files Browse the repository at this point in the history
…ows systems (#1846)

Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso authored Oct 14, 2024
1 parent eb0e920 commit fe13e89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rezplugins/shell/_utils/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import os
import re
import winreg


_drive_start_regex = re.compile(r"^([A-Za-z]):\\")
Expand Down Expand Up @@ -47,6 +46,9 @@ def to_windows_path(path):


def get_syspaths_from_registry():
# Local import to avoid import errors on non-windows systems.
import winreg

paths = []

path_query_keys = (
Expand Down

0 comments on commit fe13e89

Please sign in to comment.