The Status on the uopy.File object is from the last function/method called on the object. In your example, the -2 is for "The record was unlocked before the operation."
Note that these statuses are returned from the server, and are the same as their BASIC equivalent:
After a MATWRITE, WRITE, WRITEU, WRITEV, or WRITEVU statement:Value Description 0 The record was locked before the operation. 3 In NLS mode, the unmappable character is in the record ID. 4 In NLS mode, the unmappable character is in the record’s data.-2 The record was unlocked before the operation.-3 The record failed an SQL integrity check.-4 The record failed a trigger program.-6 Failed to write to a published file while the subsystem was shut down.
So, for your example, you can change the status by reading and locking the item first: