Message119252
| Author |
aclover |
| Recipients |
aclover |
| Date |
2010年10月21日.00:44:34 |
| SpamBayes Score |
4.5891668e-10 |
| Marked as misclassified |
No |
| Message-id |
<1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It is relatively common to have keys in the HKEY_CLASSES_ROOT MIME database that are not readable to all users, typically written by third-party applications. (My WinXP test box has a dozen, for apps like Flash, Silverlight and Java.)
Currently, initialising mimetypes causes Python to try to read them all, and if the user running Python doesn't have permission to read a key (in particular, if the user is a low-privilege daemon user such as IUSR_...), the script that caused mimetypes to be called will error out.
This patch moves the try-block around the call to OpenKey as well as QueryValueEx, allowing the key to be skipped if unreadable. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年10月21日 00:44:37 | aclover | set | recipients:
+ aclover |
| 2010年10月21日 00:44:37 | aclover | set | messageid: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> |
| 2010年10月21日 00:44:35 | aclover | link | issue10162 messages |
| 2010年10月21日 00:44:34 | aclover | create |
|