[nvda-addons] Re: Question: Possible issue on this add-on or in add-on manager
- From: "Joseph Lee" <joseph.lee22590@xxxxxxxxx>
- To: <nvda-addons@xxxxxxxxxxxxx>
- Date: Sat, 16 Apr 2016 16:22:26 -0700
Hi,
As a temporary workaround, log whatever exception is thrown (raise), then once
you figure out what's what (likely OS error), tell users that file copying has
failed like:
Try:
Shutil.copy(source, target)
Except whateverException:
Raise()
This will force add-on handler to give up.
Cheers,
Joseph
-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of James Scholes
Sent: Saturday, April 16, 2016 4:17 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Question: Possible issue on this add-on or in add-on
manager
Noelia wrote:
I don't know when it happens and I can't see nothing in the log.
This is why you can't see anything in the log:
try:
shutil.copy(os.path.join(globalVars.appArgs.configPath,
"reportPasswords.ini"), os.path.join(os.path.dirname(__file__),
"globalPlugins"))
except:
pass
You're silencing any exceptions that do occur. So if the copy operation is
failing due to previously-opened file handles that weren't disposed of properly
for example, you'll never see that error.
--
James Scholes
http://twitter.com/JamesScholes
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.
Community addons are available from:
http://addons.nvda-project.org To send a ;
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list
settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.
Community addons are available from:
http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
Other related posts: