Skip to content

Commit a4667d4

Browse files
author
flyingrub
committed
some fix
1 parent 167a3d2 commit a4667d4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

scdl/scdl.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161

6262
# Parse argument
6363
arguments = docopt(__doc__, version='0.1')
64-
print(arguments)
64+
#print(arguments)
6565

6666
if arguments["-o"] is not None:
6767
try:
@@ -72,18 +72,15 @@ def main():
7272

7373
if arguments["--hidewarnings"]:
7474
warnings.filterwarnings("ignore")
75-
# print("no warnings!") # Warn about no warnings...?
7675

7776
if arguments["--path"] is not None:
7877
if os.path.exists(arguments["--path"]):
79-
print('Downloading to '+arguments["--path"]+'...')
8078
os.chdir(arguments["--path"])
81-
else:
82-
if path is not None:
83-
print('Downloading to '+path+'...')
84-
os.chdir(path)
8579
else:
86-
print('Downloading to current directory...')
80+
print('Invalid path in option...')
81+
sys.exit()
82+
83+
print('Downloading to '+os.getcwd()+'...')
8784

8885
print('')
8986
if arguments["-l"]:
@@ -104,7 +101,6 @@ def get_config():
104101
read the path where to store music
105102
"""
106103
global token
107-
global path
108104
config = configparser.ConfigParser()
109105
config.read(os.path.join(os.path.expanduser('~'), '.config/scdl/scdl.cfg'))
110106
try:
@@ -116,7 +112,7 @@ def get_config():
116112
if os.path.exists(path):
117113
os.chdir(path)
118114
else:
119-
print('Invalid path...')
115+
print('Invalid path in scdl.cfg...')
120116
sys.exit()
121117

122118

0 commit comments

Comments
 (0)