Ejemplo n.º 1
0
 def calc(self, text):
     """based on the input text, return the int result"""
     try:
         print('In calculator')
         return real_calc(text)
     except Exception as e:
         return 0.0
Ejemplo n.º 2
0
 def calc(self, num1, num2):
     """based on the input text, return the int result"""
     try:
         return real_calc(num1, num2)
     except Exception as e:
         print(e)
         return "100"
Ejemplo n.º 3
0
 def resolve_calc(self, info, signingkey, math):
     """based on the input text, return the int result"""
     if signingkey != apiSigningKey:
         return "invalid signature"
     try:
         return real_calc(math)
     except Exception:
         return 0.0
Ejemplo n.º 4
0
 def resolve_calc(self, info, math):
     """based on the input text, return the int result"""
     try:
         return real_calc(math)
     except Exception:
         return 0.0
Ejemplo n.º 5
0
 def calc(self, text):
     """based on the input text, return the int result"""
     try:
         return real_calc(text)
     except Exception as e:
         return 0.0