[Pythonmac-SIG] Internet Config

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Mon, 15 Apr 2002 12:09:02 -0400


I've noticed a small issue, that maybe intentional in the IC module.

Internet_config = ic.IC()
....

....

Internet_config.settypecreator ( filename )

will return with a MacOS.Error (-666) if the filename's (extension) it is
passed
is not registered in the Control Panels --> Internet --> Advanced pane.

For example, until I registered python as .py / .pyo / .pyc, it would die
with a -666 when I attempted to run a IC modified version of
fixfiletypes....
Until I modified my Internet configuration.

Is this intentional?

Shouldn't the error be more informative? (i.e.
MacOs.File_Extension_Not_Registered ?)

I didn't do any serious investigation, but at first glance:

Mac:Lib:IC.py

def	settypecreator (self, file):
	....
	....
	fss.SetCreatorType (record[2], record[1])
	....
	....

Should probably have a Try / Except block, with the except containing a 
"return MacOs.Whatever_we_name_the_exception".

		- Benjamin