Expand ~ in .styxrc path
authorDavid Kerkeslager <kerkeslager@gmail.com>
Thu, 13 Aug 2020 02:08:46 +0000 (22:08 -0400)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Thu, 13 Aug 2020 02:08:46 +0000 (22:08 -0400)
styx/settings.py

index e647c67..acfb631 100644 (file)
@@ -22,7 +22,7 @@ BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
 # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
 
 try:
-    with open('~/.styxrc', 'r') as styxrc:
+    with open(os.path.expanduser('~/.styxrc'), 'r') as styxrc:
         LOCAL_SETTINGS = json.loads(styxrc.read())
 
 except FileNotFoundError: