mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:36:31 +00:00
add pxd headers for correct work
fixes definitions can run until API call
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
# cython: language_level=3
|
||||
import base64
|
||||
import subprocess
|
||||
from hashlib import sha384
|
||||
|
||||
cdef class HardwareInfo:
|
||||
cdef str cpu
|
||||
cdef str gpu
|
||||
cdef str memory
|
||||
cdef str mac_address
|
||||
cdef str hash
|
||||
|
||||
def __init__(self, str cpu, str gpu, str memory, str mac_address, str hw_hash):
|
||||
self.cpu = cpu
|
||||
self.gpu = gpu
|
||||
@@ -25,11 +18,13 @@ cdef class HardwareService:
|
||||
|
||||
def __init__(self):
|
||||
try:
|
||||
if subprocess.check_output("ver", shell=True).decode('utf-8').startswith("Microsoft"):
|
||||
res = subprocess.check_output("ver", shell=True).decode('utf-8')
|
||||
if "Microsoft Windows" in res:
|
||||
self.is_windows = True
|
||||
else:
|
||||
self.is_windows = False
|
||||
except Exception:
|
||||
print('Error during os type checking')
|
||||
self.is_windows = False
|
||||
|
||||
cdef HardwareInfo get_hardware_info(self):
|
||||
|
||||
Reference in New Issue
Block a user