File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -167,10 +167,13 @@ def newpage(batch, pagetype):
167167def atom ():
168168 """ Open project folder with atom editor"""
169169 try :
170- subprocess .check_call (["atom" , instfolder ])
170+ if misc .system == 'Windows' :
171+ subprocess .check_call (["atom" , instfolder ], shell = True )
172+ else :
173+ subprocess .check_call (["atom" , instfolder ])
174+
171175 except OSError as e :
172- print (e )
173- subprocess .check_output (["atom" , instfolder ])
176+ print (os .strerror (e ))
174177 print ("The atom editor command line tool not installed" )
175178
176179
Original file line number Diff line number Diff line change 11import os
22import subprocess
33import shutil
4+ import platform
45
5- from ..configs import sysinfo , config
6+ from ..configs import config
67
78instfolder = config .instfolder
89
910inst_dir_list = ['content' , 'images' , 'themes' ]
1011
1112content_dir_list = ['book' , 'news' , 'single' ]
1213
14+ system = platform .system ()
15+
1316def page_dir (dirname ):
1417 ptype_dir = os .path .join (instfolder , 'content' , dirname )
1518 return ptype_dir
1619
1720def open_browser ():
18- if sysinfo . system == 'Windows' :
21+ if system == 'Windows' :
1922 os .startfile (instfolder ['open' ])
20- elif sysinfo . system == 'Darwin' :
23+ elif system == 'Darwin' :
2124 subprocess .call (["open" , instfolder ])
2225 else :
2326 try :
You can’t perform that action at this time.
0 commit comments