Commit 79bb67a
committed
fix moriep dispatch-floor patcher crash when sglang.__file__ is None
The vendor image installs sglang as a namespace package where
__file__ is None. os.path.dirname(None) throws TypeError, so the
patcher crashed and the floor was never applied — eval ran unpatched.
Fall through __file__ → __path__ → importlib.util.find_spec() to
locate the package directory robustly.1 parent 6508c77 commit 79bb67a
1 file changed
Lines changed: 24 additions & 2 deletions
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
45 | 68 | | |
46 | | - | |
47 | | - | |
| 69 | + | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
| |||
0 commit comments