black my mortal enemy. thank you for changing one line maybe

This commit is contained in:
anne 2023-09-13 19:35:14 +02:00 committed by Dpeta
parent 9253a6fcff
commit 7b1fdeb62e

View file

@ -10,6 +10,7 @@ except ImportError:
DATADIR = None DATADIR = None
def isOSX(): def isOSX():
return sys.platform == "darwin" return sys.platform == "darwin"
@ -84,10 +85,10 @@ def getDataDir():
# This means that anytime its called during runtime after init will just return a lie. it will just give you a different path # This means that anytime its called during runtime after init will just return a lie. it will just give you a different path
# (Because the Application now has a Name which in turn makes it return an application-name-specific writableLocation, which pchum isnt expecting anywhere) # (Because the Application now has a Name which in turn makes it return an application-name-specific writableLocation, which pchum isnt expecting anywhere)
# so # so
# here im caching the result at init & returning that # here im caching the result at init & returning that
# seemed like the safest way to do this without breaking half of this program # seemed like the safest way to do this without breaking half of this program
return DATADIR return DATADIR
try: try:
if isOSX(): if isOSX():
return os.path.join( return os.path.join(
@ -114,4 +115,5 @@ def getDataDir():
print(e) print(e)
return "" return ""
DATADIR = getDataDir()
DATADIR = getDataDir()