Re: [bitpim-cvs-checkins] SF.net SVN: bitpim: [3702] trunk/bitpim/src/phones/com_sanyomedia.py

Roger Binns <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
[email protected] wrote:
> +            try:
> +                res=self.sendpbcommand(req, self.protocolclass.sanyonumfilesresponse)
> +            except:
> +                self.log("Skipping directory "+`idir`)

It is generally considered good Python practise to catch the explicit
exceptions you care about (in this case BrewNoSuchDirectoryException).
Otherwise the code above will mask out other exceptions (permission
denied, timeouts etc).

Roger

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.