7474import com .oracle .graal .python .runtime .PosixSupportLibrary ;
7575import com .oracle .graal .python .runtime .PosixSupportLibrary .PosixException ;
7676import com .oracle .graal .python .runtime .PosixSupportLibrary .PwdResult ;
77+ import com .oracle .graal .python .runtime .PosixSupportLibrary .UnsupportedPosixFeatureException ;
7778import com .oracle .graal .python .runtime .PythonContext ;
7879import com .oracle .graal .python .runtime .exception .PException ;
7980import com .oracle .graal .python .runtime .object .PFactory ;
@@ -166,6 +167,8 @@ static Object doGetpwuid(VirtualFrame frame, Object uidObj,
166167 }
167168 } catch (PosixException e ) {
168169 throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorFromPosixException (frame , e );
170+ } catch (UnsupportedPosixFeatureException e ) {
171+ throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorUnsupported (frame , e );
169172 }
170173 if (pwd == null ) {
171174 throw raiseUidNotFound (inliningTarget , raiseNode );
@@ -213,6 +216,8 @@ static Object doGetpwname(VirtualFrame frame, TruffleString name,
213216 }
214217 } catch (PosixException e ) {
215218 throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorFromPosixException (frame , e );
219+ } catch (UnsupportedPosixFeatureException e ) {
220+ throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorUnsupported (frame , e );
216221 }
217222 if (pwd == null ) {
218223 throw raiseNode .raise (inliningTarget , PythonBuiltinClassType .KeyError , ErrorMessages .GETPWNAM_NAME_NOT_FOUND , name );
@@ -237,6 +242,8 @@ static Object doGetpall(VirtualFrame frame,
237242 entries = posixLib .getpwentries (context .getPosixSupport ());
238243 } catch (PosixException e ) {
239244 throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorFromPosixException (frame , e );
245+ } catch (UnsupportedPosixFeatureException e ) {
246+ throw constructAndRaiseNode .get (inliningTarget ).raiseOSErrorUnsupported (frame , e );
240247 }
241248 PythonLanguage language = context .getLanguage (inliningTarget );
242249 Object [] result = new Object [entries .length ];
0 commit comments