This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年10月21日 00:44 by aclover, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| mimetypes-patch-3.2a3.patch | aclover, 2010年10月21日 00:44 | Ignore permissions errors, patch for mimetypes in py3k branch | ||
| mimetypes-patch-2.7.patch | aclover, 2010年10月21日 00:45 | Ignore permissions errors, patch for mimetypes in release27-maint branch | ||
| Messages (4) | |||
|---|---|---|---|
| msg119252 - (view) | Author: And Clover (aclover) * | Date: 2010年10月21日 00:44 | |
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. |
|||
| msg119253 - (view) | Author: And Clover (aclover) * | Date: 2010年10月21日 00:45 | |
(same against 2.7 branch) |
|||
| msg119267 - (view) | Author: Tim Golden (tim.golden) * (Python committer) | Date: 2010年10月21日 07:45 | |
I've only read the patch and not applied it, yet. But in principle I'm +1 on this. If Brian doesn't get there first, I'll try to apply later. |
|||
| msg119306 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2010年10月21日 14:50 | |
Fixed in py3k (r85774, minor correction in r85775), and release27-maint (r85776). Thanks for the patches! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:07 | admin | set | github: 54371 |
| 2010年10月21日 14:50:06 | brian.curtin | set | status: open -> closed type: enhancement -> behavior messages: + msg119306 assignee: brian.curtin resolution: fixed stage: resolved |
| 2010年10月21日 07:45:48 | tim.golden | set | messages: + msg119267 |
| 2010年10月21日 04:34:48 | ned.deily | set | nosy:
+ tim.golden, brian.curtin components: + Windows |
| 2010年10月21日 00:45:50 | aclover | set | files:
+ mimetypes-patch-2.7.patch messages: + msg119253 |
| 2010年10月21日 00:44:35 | aclover | create | |