@@ -903,20 +903,20 @@ def GetConfig32(self):
903
903
self .local .add_log ("start GetConfig32 function" , "debug" )
904
904
config32 = Dict ()
905
905
result = self .liteClient .Run ("getconfig 32" )
906
- config32 ["totalValidators" ] = int (parse (result , "total:" , ' ' ) or 0 )
907
- config32 ["mainValidators" ] = int (parse (result , "main:" , ' ' ) or 0 )
908
- config32 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ) or 0 )
909
- config32 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ) or 0 )
906
+ config32 ["totalValidators" ] = int (parse (result , "total:" , ' ' ))
907
+ config32 ["mainValidators" ] = int (parse (result , "main:" , ' ' ))
908
+ config32 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ))
909
+ config32 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ))
910
910
lines = result .split ('\n ' )
911
911
validators = list ()
912
912
for line in lines :
913
913
if "public_key:" in line :
914
914
validatorAdnlAddr = parse (line , "adnl_addr:x" , ')' )
915
915
pubkey = parse (line , "pubkey:x" , ')' )
916
916
try :
917
- validatorWeight = int (parse (line , "weight:" , ' ' ) or 0 )
917
+ validatorWeight = int (parse (line , "weight:" , ' ' ))
918
918
except ValueError :
919
- validatorWeight = int (parse (line , "weight:" , ')' ) or 0 )
919
+ validatorWeight = int (parse (line , "weight:" , ')' ))
920
920
buff = Dict ()
921
921
buff ["adnlAddr" ] = validatorAdnlAddr
922
922
buff ["pubkey" ] = pubkey
@@ -940,21 +940,21 @@ def GetConfig34(self):
940
940
self .local .add_log ("start GetConfig34 function" , "debug" )
941
941
config34 = Dict ()
942
942
result = self .liteClient .Run ("getconfig 34" )
943
- config34 ["totalValidators" ] = int (parse (result , "total:" , ' ' ) or 0 )
944
- config34 ["mainValidators" ] = int (parse (result , "main:" , ' ' ) or 0 )
945
- config34 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ) or 0 )
946
- config34 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ) or 0 )
947
- config34 ["totalWeight" ] = int (parse (result , "total_weight:" , ' ' ) or 0 )
943
+ config34 ["totalValidators" ] = int (parse (result , "total:" , ' ' ))
944
+ config34 ["mainValidators" ] = int (parse (result , "main:" , ' ' ))
945
+ config34 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ))
946
+ config34 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ))
947
+ config34 ["totalWeight" ] = int (parse (result , "total_weight:" , ' ' ))
948
948
lines = result .split ('\n ' )
949
949
validators = list ()
950
950
for line in lines :
951
951
if "public_key:" in line :
952
952
validatorAdnlAddr = parse (line , "adnl_addr:x" , ')' )
953
953
pubkey = parse (line , "pubkey:x" , ')' )
954
954
try :
955
- validatorWeight = int (parse (line , "weight:" , ' ' ) or 0 )
955
+ validatorWeight = int (parse (line , "weight:" , ' ' ))
956
956
except ValueError :
957
- validatorWeight = int (parse (line , "weight:" , ')' ) or 0 )
957
+ validatorWeight = int (parse (line , "weight:" , ')' ))
958
958
buff = Dict ()
959
959
buff ["adnlAddr" ] = validatorAdnlAddr
960
960
buff ["pubkey" ] = pubkey
@@ -979,9 +979,9 @@ def GetConfig36(self):
979
979
config36 = dict ()
980
980
try :
981
981
result = self .liteClient .Run ("getconfig 36" )
982
- config36 ["totalValidators" ] = int (parse (result , "total:" , ' ' ) or 0 )
983
- config36 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ) or 0 )
984
- config36 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ) or 0 )
982
+ config36 ["totalValidators" ] = int (parse (result , "total:" , ' ' ))
983
+ config36 ["startWorkTime" ] = int (parse (result , "utime_since:" , ' ' ))
984
+ config36 ["endWorkTime" ] = int (parse (result , "utime_until:" , ' ' ))
985
985
lines = result .split ('\n ' )
986
986
validators = list ()
987
987
for line in lines :
0 commit comments