(dictionary, key1, key2, factor, default_value=None)
| 873 | |
| 874 | @staticmethod |
| 875 | def safe_integer_product_2(dictionary, key1, key2, factor, default_value=None): |
| 876 | try: |
| 877 | return int(float(dictionary[key1]) * factor) |
| 878 | except Exception: |
| 879 | try: |
| 880 | return int(float(dictionary[key2]) * factor) |
| 881 | except Exception: |
| 882 | return default_value |
| 883 | |
| 884 | @staticmethod |
| 885 | def safe_timestamp_2(dictionary, key1, key2, default_value=None): |
no outgoing calls