From 4fe2de96e16561b9f417de312c433fe5d792f4e0 Mon Sep 17 00:00:00 2001
From: TonyFord <tonyford@strategy-investor.de>
Date: Mon, 12 Jul 2021 15:29:03 +0200
Subject: [PATCH] bugfix

---
 git_import.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/git_import.py b/git_import.py
index 6d129e8..577aebf 100644
--- a/git_import.py
+++ b/git_import.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 import os
 import hashlib
 import sys
@@ -14,6 +16,7 @@ RPATH='./services/tmp'
 def checkUserYml():
 
     if( not os.path.exists(RPATH+'/user.yml') ):
+        print( uname + ' - user.yml not found in repository' )
         return
 
     with open( RPATH + '/user.yml', 'r') as stream:
@@ -25,6 +28,8 @@ def checkUserYml():
                 os.mkdir( TPATH + '/' + uname )
                 shutil.move( RPATH + '/user.yml', TPATH + '/' + uname + '/' )
                 getRepoYml()
+            else:
+                print( 'field list does not match ( county, lang, latitude, longitude, faircoinaddress )' )
 
         except yaml.YAMLError as exc:
             print('user.yml invalid')
@@ -83,7 +88,8 @@ def getRepoYml():
                         if( not os.path.isdir( IPATH ) ):
                             os.mkdir( IPATH )
                         if( os.path.isfile( RPATH + '/images/' + y[:-4] + '.jpg' ) ):
-                            os.mkdir( IPATH + '/' + uname )
+                            if( not os.path.isdir( IPATH + '/' + uname ) ):
+                                os.mkdir( IPATH + '/' + uname )
                             shutil.move( RPATH + '/images/' + y[:-4] + '.jpg', IPATH + '/' + uname + '/' )
 
                 if( not 'description' in u ):
-- 
GitLab