Factored statement always executed in conditional (#2121)

This commit is contained in:
रोहित हिल 2020-09-07 10:58:56 +05:30 committed by GitHub
parent 8c6874d855
commit 992c5464ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -46,14 +46,13 @@ except Exception as e:
else:
sys.path.append(CURRENT_DIR)
from powerline.lib.shell import which
can_use_scripts = True
if which('socat') and which('sed') and which('sh'):
print('Using powerline.sh script instead of C version (requires socat, sed and sh)')
shutil.copyfile('client/powerline.sh', 'scripts/powerline')
can_use_scripts = True
else:
print('Using powerline.py script instead of C version')
shutil.copyfile('client/powerline.py', 'scripts/powerline')
can_use_scripts = True
else:
can_use_scripts = False