File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ def skip_if_buildbot(reason=None):
387
387
reason = 'not suitable for buildbots'
388
388
try :
389
389
isbuildbot = getpass .getuser ().lower () == 'buildbot'
390
- except (KeyError , EnvironmentError ) as err :
390
+ except (KeyError , OSError ) as err :
391
391
warnings .warn (f'getpass.getuser() failed { err } .' , RuntimeWarning )
392
392
isbuildbot = False
393
393
return unittest .skipIf (isbuildbot , reason )
Original file line number Diff line number Diff line change @@ -1407,7 +1407,7 @@ def open_fds():
1407
1407
t = threading .Thread (target = open_fds )
1408
1408
t .start ()
1409
1409
try :
1410
- with self .assertRaises (EnvironmentError ):
1410
+ with self .assertRaises (OSError ):
1411
1411
subprocess .Popen (NONEXISTING_CMD ,
1412
1412
stdin = subprocess .PIPE ,
1413
1413
stdout = subprocess .PIPE ,
You can’t perform that action at this time.
0 commit comments