[issue10162] mimetypes read_windows_registry should tolerate permissions errors

2010-10-21 Thread Tim Golden

Tim Golden m...@timgolden.me.uk added the comment:

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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10162] mimetypes read_windows_registry should tolerate permissions errors

2010-10-21 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Fixed in py3k (r85774, minor correction in r85775), and release27-maint 
(r85776).

Thanks for the patches!

--
assignee:  - brian.curtin
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type: feature request - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10162] mimetypes read_windows_registry should tolerate permissions errors

2010-10-20 Thread And Clover

New submission from And Clover a...@doxdesk.com:

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.

--
components: Library (Lib)
files: mimetypes-patch-3.2a3.patch
keywords: patch
messages: 119252
nosy: aclover
priority: normal
severity: normal
status: open
title: mimetypes read_windows_registry should tolerate permissions errors
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file19314/mimetypes-patch-3.2a3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10162] mimetypes read_windows_registry should tolerate permissions errors

2010-10-20 Thread And Clover

And Clover a...@doxdesk.com added the comment:

(same against 2.7 branch)

--
Added file: http://bugs.python.org/file19315/mimetypes-patch-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10162] mimetypes read_windows_registry should tolerate permissions errors

2010-10-20 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
components: +Windows
nosy: +brian.curtin, tim.golden

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10162
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com