Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan committed Dec 28, 2023
1 parent 1ff7ef6 commit fd37262
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions command_runner/elevate.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def main(argv):

__intname__ = "command_runner.elevate"
__author__ = "Orsiris de Jong"
__copyright__ = "Copyright (C) 2017-2021 Orsiris de Jong"
__copyright__ = "Copyright (C) 2017-2023 Orsiris de Jong"
__licence__ = "BSD 3 Clause"
__version__ = "0.3.1"
__build__ = "2021031601"
__version__ = "0.3.2"
__build__ = "2023122801"

from logging import getLogger
import os
Expand Down Expand Up @@ -159,14 +159,15 @@ def _check_environment():
# | Win | sys.executable | C:\Python\python.exe | C:\Python\Python.exe | C:\absolute\path\to\test.exe |
# --------------------------------------------------------------------------------------------------------------

# Nuitka > 0.8 just declares __compiled__ variables
# Nuitka 0.6.2 and newer define builtin __nuitka_binary_dir
# Nuitka does not set the frozen attribute on sys
# Nuitka < 0.6.2 can be detected in sloppy ways, ie if not sys.argv[0].endswith('.py') or len(sys.path) < 3
# Let's assume this will only be compiled with newer nuitka, and remove sloppy detections
is_nuitka_compiled = False
try:
# Actual if statement not needed, but keeps code inspectors more happy
if __nuitka_binary_dir or "__compiled__" in globals() is not None:
if "__compiled__" in globals():
is_nuitka_compiled = True
except NameError:
pass
Expand Down

0 comments on commit fd37262

Please sign in to comment.