Skip to content

Commit 07d81cf

Browse files
author
Han Wang
committed
trying to fix bug
1 parent 6c1590c commit 07d81cf

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dpgen/dispatcher/LazyLocalContext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_return(self, proc):
127127
o, e = proc.communicate()
128128
stdout = SPRetObj(o)
129129
stderr = SPRetObj(e)
130-
except:
130+
except ValueError:
131131
stdout = None
132132
stderr = None
133133
return ret, stdout, stderr

dpgen/dispatcher/LocalContext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def get_return(self, proc):
196196
o, e = proc.communicate()
197197
stdout = SPRetObj(o)
198198
stderr = SPRetObj(e)
199-
except:
199+
except ValueError:
200200
stdout = None
201201
stderr = None
202202
return ret, stdout, stderr

tests/dispatcher/test_lazy_local_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_file(self) :
157157

158158
def test_call(self) :
159159
self.job = LazyLocalContext('loc', None)
160-
proc = self.job.call('sleep 3')
160+
proc = self.job.call('sleep 1.5')
161161
self.assertFalse(self.job.check_finish(proc))
162162
time.sleep(1)
163163
self.assertFalse(self.job.check_finish(proc))

tests/dispatcher/test_local_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def test_file(self) :
346346
def test_call(self) :
347347
work_profile = LocalSession({'work_path':'rmt'})
348348
self.job = LocalContext('loc', work_profile)
349-
proc = self.job.call('sleep 3')
349+
proc = self.job.call('sleep 1.5')
350350
self.assertFalse(self.job.check_finish(proc))
351351
time.sleep(1)
352352
self.assertFalse(self.job.check_finish(proc))

0 commit comments

Comments
 (0)