Skip to content

Commit

Permalink
Handle when wmi is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
dhinakg committed Feb 27, 2022
1 parent 18833a9 commit 05d983a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scripts/shared.py
Expand Up @@ -7,7 +7,7 @@

from Scripts._build import BUILD

VERSION = "0.0.9"
VERSION = "0.1.1"

if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
current_dir = Path(sys.executable).parent
Expand Down
12 changes: 10 additions & 2 deletions Windows.py
Expand Up @@ -2,9 +2,17 @@
import json
import time
from enum import Enum
from pathlib import Path

import wmi # pylint: disable=import-error
try:
import wmi # pylint: disable=import-error
except Exception: # pylint: disable=broad-except
# Dummy WMI
class wmi: # pylint: disable=invalid-name
class WMI:
@staticmethod
def query(*args, **kwargs): # pylint: disable=unused-argument
return []


from base import BaseUSBMap
from Scripts import shared, usbdump
Expand Down

0 comments on commit 05d983a

Please sign in to comment.