From b7ac18d46edcc2a99b350827966f39d8f00b8d04 Mon Sep 17 00:00:00 2001 From: TonyFord <tonyford@strategy-investor.de> Date: Tue, 22 Jun 2021 20:04:30 +0200 Subject: [PATCH] fix --- git_import.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git_import.py b/git_import.py index 4539b3e..13a5532 100644 --- a/git_import.py +++ b/git_import.py @@ -28,6 +28,8 @@ def checkUserYml(): def getRepoYml(): for y in os.listdir( RPATH ): + if( not os.path.isfile( RPATH + '/' + y ) ): + continue if( y == 'user.yml'): continue with open( RPATH + '/' + y, 'r') as stream: @@ -44,8 +46,8 @@ def getRepoYml(): if( os.path.exists(QPATH) ): for f in os.listdir( QPATH ): - if( os.path.isfile(f) ): - h=hashlib.md5(open( QPATH + '/'+f,'rb').read()).hexdigest() + if( os.path.isfile( QPATH + '/' + f ) ): + h=hashlib.md5(open( QPATH + '/' + f,'rb').read()).hexdigest() repo=open( QPATH + '/' + f,'r').read() os.system( 'rm -rf '+RPATH ) os.system( 'git clone '+repo+' --config core.sshCommand="ssh -i ~/.ssh/p2p" ' + RPATH ) -- GitLab