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

Windows Support OS' geteuid #24

Open
Zamanry opened this issue Jun 23, 2023 · 0 comments
Open

Windows Support OS' geteuid #24

Zamanry opened this issue Jun 23, 2023 · 0 comments

Comments

@Zamanry
Copy link
Owner

Zamanry commented Jun 23, 2023

PS C:\Users\User\Downloads\iker> python .\iker.py
Traceback (most recent call last):
File "C:\Users\User\Downloads\iker\iker.py", line 35, in
from os import geteuid
ImportError: cannot import name 'geteuid' from 'os' (C:\Program Files\Python\lib\os.py)

Problem code:

from os import geteuid
...
def checkPrivileges():
	'''This method checks if the script was launched with root privileges.
	@return True if it was launched with root privs and False in other case.'''

	return geteuid() == 0

Occurred because geteuid only works on UNIX systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant