예제 #1
0
 def from_file(filename, **kw):
   try:
     with safe_open(filename) as fp:
       task = Task.json_load(fp)
     return ThermosTaskWrapper(task, **kw)
   except Exception as e:
     return None
예제 #2
0
 def from_file(cls, filename, **kw):
   try:
     with safe_open(filename) as fp:
       task = Task.json_load(fp)
     return cls(task, **kw)
   except Exception:
     return None
예제 #3
0
 def from_file(cls, filename, **kw):
     try:
         with safe_open(filename) as fp:
             task = Task.json_load(fp)
         return cls(task, **kw)
     except Exception:
         return None