@@ -584,46 +584,46 @@ def get_hashval(self, hash_method=None):
584
584
return dict_withhash , md5 (encode_dict (dict_nofilename ).encode ()).hexdigest ()
585
585
586
586
587
- def _get_sorteddict (self , theobject , dictwithhash = False , hash_method = None ,
587
+ def _get_sorteddict (self , objekt , dictwithhash = False , hash_method = None ,
588
588
hash_files = True ):
589
- if isinstance (theobject , dict ):
589
+ if isinstance (objekt , dict ):
590
590
out = []
591
- for key , val in sorted (theobject .items ()):
591
+ for key , val in sorted (objekt .items ()):
592
592
if isdefined (val ):
593
593
out .append ((key ,
594
594
self ._get_sorteddict (val , dictwithhash ,
595
595
hash_method = hash_method ,
596
596
hash_files = hash_files )))
597
- elif isinstance (theobject , (list , tuple )):
597
+ elif isinstance (objekt , (list , tuple )):
598
598
out = []
599
- for val in theobject :
599
+ for val in objekt :
600
600
if isdefined (val ):
601
601
out .append (self ._get_sorteddict (val , dictwithhash ,
602
602
hash_method = hash_method ,
603
603
hash_files = hash_files ))
604
- if isinstance (theobject , tuple ):
604
+ if isinstance (objekt , tuple ):
605
605
out = tuple (out )
606
606
else :
607
- if isdefined (theobject ):
608
- if (hash_files and isinstance (theobject , (str , bytes )) and
609
- os .path .isfile (theobject )):
607
+ if isdefined (objekt ):
608
+ if (hash_files and isinstance (objekt , (str , bytes )) and
609
+ os .path .isfile (objekt )):
610
610
if hash_method is None :
611
611
hash_method = config .get ('execution' , 'hash_method' )
612
612
613
613
if hash_method .lower () == 'timestamp' :
614
- hash = hash_timestamp (theobject )
614
+ hash = hash_timestamp (objekt )
615
615
elif hash_method .lower () == 'content' :
616
- hash = hash_infile (theobject )
616
+ hash = hash_infile (objekt )
617
617
else :
618
618
raise Exception ("Unknown hash method: %s" % hash_method )
619
619
if dictwithhash :
620
- out = (theobject , hash )
620
+ out = (objekt , hash )
621
621
else :
622
622
out = hash
623
- elif isinstance (theobject , float ):
624
- out = FLOAT_FORMAT (theobject )
623
+ elif isinstance (objekt , float ):
624
+ out = FLOAT_FORMAT (objekt )
625
625
else :
626
- out = theobject
626
+ out = objekt
627
627
return out
628
628
629
629
0 commit comments