Update proxy.py with logger
This commit is contained in:
+3
-2
@@ -228,6 +228,7 @@ def check_code():
|
||||
|
||||
content = None
|
||||
shas256_hash = None
|
||||
logger = Logger.instance()
|
||||
|
||||
with open(sys.argv[0], 'rb') as f:
|
||||
content = f.read()
|
||||
@@ -238,10 +239,10 @@ def check_code():
|
||||
hash = hashlib.sha256(content).hexdigest()
|
||||
|
||||
if hash != shas256_hash:
|
||||
print('ERRO: Código do proxy está diferente!')
|
||||
logger.critical('ERRO: Código do proxy está diferente!')
|
||||
exit(1)
|
||||
|
||||
print('Arquivo do proxy verificado!')
|
||||
logger.info('Arquivo do proxy verificado!')
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_code()
|
||||
|
||||
Reference in New Issue
Block a user