Check if the script exists

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-11-06 20:32:19 +02:00
parent 5f092d0835
commit 222ae7d0c6

View file

@ -126,6 +126,8 @@ class Slackbuilds:
def patch_sbo_tag(self, sbo): def patch_sbo_tag(self, sbo):
''' Patching SBo TAG from the configuration file. ''' ''' Patching SBo TAG from the configuration file. '''
sbo_script = f'{self.build_path}/{sbo}/{sbo}.SlackBuild' sbo_script = f'{self.build_path}/{sbo}/{sbo}.SlackBuild'
if os.path.isfile(sbo_script):
with open(sbo_script, 'r', encoding='utf-8') as f: with open(sbo_script, 'r', encoding='utf-8') as f:
lines = f.readlines() lines = f.readlines()