Skip to content

Commit 57269cf

Browse files
committed
Add settings.py data into utility.py
1 parent ed6e07c commit 57269cf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/arguments/utility.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from .error import SearchError
1616
from .save import SaveSearchResults
1717
from .markdown import MarkdownRenderer
18+
from .settings import PLAYBOOK_DIR
1819

1920
# Required for OAuth
2021
import json
@@ -36,11 +37,6 @@
3637

3738
class Playbook():
3839
def __init__(self):
39-
self.linux_path = "/home/{}/Documents/dynamic".\
40-
format(os.getenv('USER'))
41-
self.mac_path = "/Users/{}/Documents/dynamic".\
42-
format(os.getenv('USER'))
43-
self.file_name = 'dynamic_playbook.json'
4440
self.key = 'DYNAMIC'
4541

4642
@property
@@ -51,11 +47,7 @@ def playbook_path(self):
5147
"""
5248
if not os.getenv(self.key):
5349
if(sys.platform=='linux'):
54-
os.environ[self.key] = os.path.\
55-
join(self.linux_path, self.file_name)
56-
elif(sys.platform=='darwin'):
57-
os.environ[self.key] = os.path.\
58-
join(self.mac_path, self.file_name)
50+
os.environ[self.key] = PLAYBOOK_DIR
5951
return os.getenv(self.key)
6052

6153
@property

0 commit comments

Comments
 (0)