Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add status codes #18

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cryptlex/lexfloatclient/lexfloatclient_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,18 @@ def get_error_message(code):
return 'The server license has been suspended.'
if code == LexFloatStatusCodes.LF_E_SERVER_LICENSE_GRACE_PERIOD_OVER:
return 'The grace period for server license is over.'
if code == LexFloatStatusCodes.LF_E_SYSTEM_PERMISSION:
return 'Insufficient system permissions.'
if code == LexFloatStatusCodes.LF_E_INVALID_PERMISSION_FLAG:
return 'Invalid permission flag.'
if code == LexFloatStatusCodes.LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED:
return 'Offline floating license is not allowed for per-instance leasing strategy.'
if code == LexFloatStatusCodes.LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED:
return 'Maximum offline lease duration exceeded.'
if code == LexFloatStatusCodes.LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED:
return 'Allowed offline floating clients limit reached.'
if code == LexFloatStatusCodes.LF_E_WMIC:
return "Fingerprint couldn't be generated because Windows Management Instrumentation (WMI) service has been disabled. This error is specific to Windows only."
if code == LexFloatStatusCodes.LF_E_MACHINE_FINGERPRINT:
return 'Machine fingerprint has changed since activation.'
return 'Unknown error!'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muneebkq Please add the invalid proxy error code as well

18 changes: 16 additions & 2 deletions cryptlex/lexfloatclient/lexfloatstatus_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,24 @@ class LexFloatStatusCodes:
LF_E_METER_ATTRIBUTE_USES_LIMIT_REACHED = 56

LF_E_PRODUCT_VERSION_NOT_LINKED = 57

LF_E_FEATURE_FLAG_NOT_FOUND = 58


LF_E_SYSTEM_PERMISSION = 59

LF_E_IP = 60

LF_E_INVALID_PERMISSION_FLAG = 61

LF_E_OFFLINE_FLOATING_LICENSE_NOT_ALLOWED = 62

LF_E_MAX_OFFLINE_LEASE_DURATION_EXCEEDED = 63

LF_E_ALLOWED_OFFLINE_FLOATING_CLIENTS_LIMIT_REACHED = 64

LF_E_WMIC = 65

LF_E_MACHINE_FINGERPRINT = 66

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muneebkq Please add 67 as well

LF_E_CLIENT = 70

Expand Down