Factored statement always executed in conditional (#2121)
This commit is contained in:
parent
8c6874d855
commit
992c5464ba
3
setup.py
3
setup.py
|
@ -46,14 +46,13 @@ except Exception as e:
|
||||||
else:
|
else:
|
||||||
sys.path.append(CURRENT_DIR)
|
sys.path.append(CURRENT_DIR)
|
||||||
from powerline.lib.shell import which
|
from powerline.lib.shell import which
|
||||||
|
can_use_scripts = True
|
||||||
if which('socat') and which('sed') and which('sh'):
|
if which('socat') and which('sed') and which('sh'):
|
||||||
print('Using powerline.sh script instead of C version (requires socat, sed and sh)')
|
print('Using powerline.sh script instead of C version (requires socat, sed and sh)')
|
||||||
shutil.copyfile('client/powerline.sh', 'scripts/powerline')
|
shutil.copyfile('client/powerline.sh', 'scripts/powerline')
|
||||||
can_use_scripts = True
|
|
||||||
else:
|
else:
|
||||||
print('Using powerline.py script instead of C version')
|
print('Using powerline.py script instead of C version')
|
||||||
shutil.copyfile('client/powerline.py', 'scripts/powerline')
|
shutil.copyfile('client/powerline.py', 'scripts/powerline')
|
||||||
can_use_scripts = True
|
|
||||||
else:
|
else:
|
||||||
can_use_scripts = False
|
can_use_scripts = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue