Merge pull request #34 from puremourning/lgtm

Fix flake8 errors and lgtm errors in install_gadget.py
This commit is contained in:
mergify[bot] 2019-06-08 10:18:42 +00:00 • committed by GitHub
commit 3b854a8701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,8 @@ GADGETS = {
'all': { 'all': {
'file_name': 'vscode-mono-debug.vsix', 'file_name': 'vscode-mono-debug.vsix',
'version': '0.15.8', 'version': '0.15.8',
'checksum': '723eb2b621b99d65a24f215cb64b45f5fe694105613a900a03c859a62a810470', 'checksum':
'723eb2b621b99d65a24f215cb64b45f5fe694105613a900a03c859a62a810470',
} }
}, },
'vscode-bash-debug': { 'vscode-bash-debug': {
@ -136,6 +137,7 @@ GADGETS = {
} }
} }
@contextlib.contextmanager @contextlib.contextmanager
def CurrentWorkingDir( d ): def CurrentWorkingDir( d ):
cur_d = os.getcwd() cur_d = os.getcwd()
@ -324,6 +326,7 @@ def CloneRepoTo( url, ref, destination ):
subprocess.check_call( [ 'git', 'clone', url, destination ] ) subprocess.check_call( [ 'git', 'clone', url, destination ] )
subprocess.check_call( [ 'git', '-C', destination, 'checkout', ref ] ) subprocess.check_call( [ 'git', '-C', destination, 'checkout', ref ] )
OS = install.GetOS() OS = install.GetOS()
gadget_dir = install.GetGadgetDir( os.path.dirname( __file__ ), OS ) gadget_dir = install.GetGadgetDir( os.path.dirname( __file__ ), OS )