remove redundant default value

Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
This commit is contained in:
nulano 2023-01-01 19:32:21 +01:00 committed by Andrew Murray
parent 698951e19e
commit 73f55b4e01
3 changed files with 4 additions and 6 deletions

View File

@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
HAS_UPLOADER = False HAS_UPLOADER = False
if os.environ.get("SHOW_ERRORS", None): if os.environ.get("SHOW_ERRORS"):
# local img.show for errors. # local img.show for errors.
HAS_UPLOADER = True HAS_UPLOADER = True
@ -271,7 +271,7 @@ def netpbm_available():
def magick_command(): def magick_command():
if sys.platform == "win32": if sys.platform == "win32":
magickhome = os.environ.get("MAGICK_HOME", "") magickhome = os.environ.get("MAGICK_HOME")
if magickhome: if magickhome:
imagemagick = [os.path.join(magickhome, "convert.exe")] imagemagick = [os.path.join(magickhome, "convert.exe")]
graphicsmagick = [os.path.join(magickhome, "gm.exe"), "convert"] graphicsmagick = [os.path.join(magickhome, "gm.exe"), "convert"]

View File

@ -567,9 +567,7 @@ class pil_build_ext(build_ext):
): ):
for dirname in _find_library_dirs_ldconfig(): for dirname in _find_library_dirs_ldconfig():
_add_directory(library_dirs, dirname) _add_directory(library_dirs, dirname)
if sys.platform.startswith("linux") and os.environ.get( if sys.platform.startswith("linux") and os.environ.get("ANDROID_ROOT"):
"ANDROID_ROOT", None
):
# termux support for android. # termux support for android.
# system libraries (zlib) are installed in /system/lib # system libraries (zlib) are installed in /system/lib
# headers are at $PREFIX/include # headers are at $PREFIX/include

View File

@ -1020,7 +1020,7 @@ def truetype(font=None, size=10, index=0, encoding="", layout_engine=None):
if windir: if windir:
dirs.append(os.path.join(windir, "fonts")) dirs.append(os.path.join(windir, "fonts"))
elif sys.platform in ("linux", "linux2"): elif sys.platform in ("linux", "linux2"):
lindirs = os.environ.get("XDG_DATA_DIRS", "") lindirs = os.environ.get("XDG_DATA_DIRS")
if not lindirs: if not lindirs:
# According to the freedesktop spec, XDG_DATA_DIRS should # According to the freedesktop spec, XDG_DATA_DIRS should
# default to /usr/share # default to /usr/share