Skip to content

Commit 210e50e

Browse files
committed
Minor changes
1 parent f2fa831 commit 210e50e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/runtime/Types/DynamicClassObject.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public static NewReference tp_getattro(BorrowedReference ob, BorrowedReference k
8282
}
8383

8484
var name = Runtime.GetManagedString(key);
85-
var callSite = GetAttrCallSite(name, clrObj.inst.GetType());
85+
var clrObjectType = clrObj.inst.GetType();
86+
var callSite = GetAttrCallSite(name, clrObjectType);
8687

8788
try
8889
{
@@ -91,7 +92,7 @@ public static NewReference tp_getattro(BorrowedReference ob, BorrowedReference k
9192
}
9293
catch (RuntimeBinder.RuntimeBinderException)
9394
{
94-
Exceptions.SetError(Exceptions.AttributeError, $"'{clrObj?.inst.GetType()}' object has no attribute '{name}'");
95+
Exceptions.SetError(Exceptions.AttributeError, $"'{clrObjectType}' object has no attribute '{name}'");
9596
}
9697
}
9798
}

0 commit comments

Comments
 (0)