summarylogtreecommitdiffstats
path: root/config-in-homedir.patch
blob: 4a698d7f0c7ae1901d8271dda492fb7003e58601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 95b52a26fe0c0457c85f8ab555f61309d1f8f70b Mon Sep 17 00:00:00 2001
From: Lucy <lucy@poulton.xyz>
Date: Fri, 22 Jan 2021 12:57:20 +0000
Subject: [PATCH] config in homedir

---
 iksm.py             | 9 +++------
 splatnet2statink.py | 9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/iksm.py b/iksm.py
index 0799662..d050a7d 100644
--- a/iksm.py
+++ b/iksm.py
@@ -9,12 +9,9 @@ import uuid, time, random, string
 session = requests.Session()
 version = "unknown"
 
-# place config.txt in same directory as script (bundled or not)
-if getattr(sys, 'frozen', False):
-	app_path = os.path.dirname(sys.executable)
-elif __file__:
-	app_path = os.path.dirname(__file__)
-config_path = os.path.join(app_path, "config.txt")
+# place splatnet2statink.conf in home directory (lucy@poulton.xyz patch for aur 22/1/21) 
+
+config_path = os.path.join(os.path.expanduser("~"), "splatnet2statink.conf")
 
 def log_in(ver):
 	'''Logs in to a Nintendo Account and returns a session_token.'''
diff --git a/splatnet2statink.py b/splatnet2statink.py
index 90d288e..eab8c18 100755
--- a/splatnet2statink.py
+++ b/splatnet2statink.py
@@ -25,12 +25,9 @@ A_VERSION = "1.5.7"
 
 print("splatnet2statink v{}".format(A_VERSION))
 
-# place config.txt in same directory as script (bundled or not)
-if getattr(sys, 'frozen', False):
-	app_path = os.path.dirname(sys.executable)
-elif __file__:
-	app_path = os.path.dirname(__file__)
-config_path = os.path.join(app_path, "config.txt")
+# place splatnet2statink.conf in home directory (lucy@poulton.xyz patch for aur 22/1/21)
+
+config_path = os.path.join(os.path.expanduser("~"), "splatnet2statink.conf")
 
 try:
 	config_file = open(config_path, "r")
-- 
2.30.0