Skip to content

Commit eacfcd9

Browse files
committed
Implement termios.error
1 parent bc1f309 commit eacfcd9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/core/IronPython.Modules/termios.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System;
88
using System.Collections;
99
using System.Numerics;
10+
using System.Runtime.CompilerServices;
1011
using System.Runtime.InteropServices;
1112
using System.Runtime.Versioning;
1213

@@ -28,13 +29,21 @@ public static class PythonTermios {
2829
public const string __doc__ = "Stub of termios, just enough to support module tty.";
2930
// and also prompt_toolkit.terminal.vt100_input
3031

32+
#pragma warning disable IPY01 // Parameter which is marked not nullable does not have the NotNullAttribute
33+
[SpecialName]
34+
public static void PerformModuleReload(PythonContext context, PythonDictionary dict)
35+
=> context.EnsureModuleException("termioserror", dict, "error", "termios");
36+
#pragma warning restore IPY01 // Parameter which is marked not nullable does not have the NotNullAttribute
37+
38+
3139
#region termios IO Control Codes (TIOC*)
3240

3341
public static int TIOCGWINSZ => RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 0x40087468 : 0x5413;
3442

3543

3644
#endregion
3745

46+
3847
#region Other Public Constants
3948
// Linux: glibc/bits/termios.h (/usr/include/{x86_64,aarch64}-linux-gnu/)
4049
// macOS: usr/include/sys/termios.h (/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk)

0 commit comments

Comments
 (0)