File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,14 @@ def _install_package_source() -> None:
113
113
install_script_url = 'http://apertium.projectjj.com/apt/install-nightly.sh'
114
114
with tempfile .NamedTemporaryFile ('w' ) as install_script :
115
115
urlretrieve (install_script_url , install_script .name )
116
- subprocess .call ('sudo bash {}' .format (install_script .name ), shell = True )
116
+ execute = subprocess .run (['sudo' , 'bash' , install_script .name ])
117
+ execute .check_returncode ()
117
118
118
119
@staticmethod
119
120
def _download_packages (packages : List [str ]) -> None :
120
- command = 'sudo apt-get -f --allow-unauthenticated install {}'
121
- for package in packages :
122
- subprocess . run ( command . format ( package ), shell = True , check = True )
121
+ command = [ 'sudo' , ' apt-get' , ' install' ] + packages
122
+ execute = subprocess . run ( command )
123
+ execute . check_returncode ( )
123
124
124
125
def install_apertium_language (self , languages : List [str ]) -> None :
125
126
self ._download_packages (languages )
You can’t perform that action at this time.
0 commit comments