summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2020-12-11 19:26:49 +0500
committerGitHub <noreply@github.com>2020-12-11 19:26:49 +0500
commit48357882e5c095003e10f8351b405bf54e41424f (patch)
treeca93bbc48c8a98bec36101d235047c58adbc0fe0
parent1e126c5f96e688dd89454ea6463de93e2f65cacb (diff)
downloadappdirs-48357882e5c095003e10f8351b405bf54e41424f.tar.gz
Use ternary operator for better readability
-rw-r--r--appdirs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/appdirs.py b/appdirs.py
index 20103ba..08abda8 100644
--- a/appdirs.py
+++ b/appdirs.py
@@ -76,7 +76,7 @@ def user_data_dir(appname=None, appauthor=None, version=None, roaming=False):
if system == "win32":
if appauthor is None:
appauthor = appname
- const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
+ const = "CSIDL_APPDATA" if roaming else "CSIDL_LOCAL_APPDATA"
path = os.path.normpath(_get_win_folder(const))
if appname:
if appauthor is not False: