minor fixes, backup generator (TODO: restorer)

This commit is contained in:
Arturo Hernandez
2018-08-30 16:31:49 -04:00
parent a726545d18
commit 99b677a9da
6 changed files with 128 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ class Attendance(object):
self.punch = punch
def __str__(self):
return '<Attendance>: {} : {}'.format(self.user_id, self.timestamp)
return '<Attendance>: {} : {} ({}, {})'.format(self.user_id, self.timestamp, self.status, self.punch)
def __repr__(self):
return '<Attendance>: {} : {}'.format(self.user_id, self.timestamp)
return '<Attendance>: {} : {} ({}, {})'.format(self.user_id, self.timestamp,self.status, self.punch)

View File

@@ -973,7 +973,7 @@ class ZK(object):
if self.verbose: print("WRN: no user data") # debug
return []
total_size = unpack('i', templatedata[0:4])[0]
print ("get template total size {}, size {} len {}".format(total_size, size, len(templatedata)))
if self.verbose: print ("get template total size {}, size {} len {}".format(total_size, size, len(templatedata)))
templatedata = templatedata[4:] #total size not used
# ZKFinger VX10.0 the only finger firmware tested
while total_size: