Correction bug : Vérification que le dump est complet avant de reprendre le dump pour une autre copie
This commit is contained in:
parent
2a59a0f67c
commit
ea32ee6c19
@ -78,7 +78,8 @@ def readBadge():
|
|||||||
badge_type = lines[4].replace(' ', ' ')
|
badge_type = lines[4].replace(' ', ' ')
|
||||||
if '00 04' in badge_type:
|
if '00 04' in badge_type:
|
||||||
badge_UID = lines[5].replace('UID (NFCID1): ', '').replace(' ', '')
|
badge_UID = lines[5].replace('UID (NFCID1): ', '').replace(' ', '')
|
||||||
if os.path.isfile('%s/%s.dmp' % (DUMPS_DIR, badge_UID)): # Si un dump existe déjà pour cet UID
|
# Si un dump existe déjà pour cet UID et qu'il est complet
|
||||||
|
if ((os.path.isfile('%s/%s.dmp' % (DUMPS_DIR, badge_UID))) and (os.path.getsize('%s/%s.dmp' % (DUMPS_DIR, badge_UID)))) == 1024:
|
||||||
result = {'status': 'OK', 'UID': badge_UID}
|
result = {'status': 'OK', 'UID': badge_UID}
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user