Author: poeml Date: Thu May 31 22:37:40 2012 New Revision: 8293 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8293&view=rev Log: mb makehashes: - handle permission denied errors gracefully (fixing issue #105). Thanks, Tom Albers for report & patch! Modified: trunk/mb/mb.py Modified: trunk/mb/mb.py URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/mb.py?rev=8293&r1=8292&r2=8293&view=diff ============================================================================== --- trunk/mb/mb.py (original) +++ trunk/mb/mb.py Thu May 31 22:37:40 2012 _at_@ -1040,7 +1040,11 @@ # a set offers the fastest access for "foo in ..." lookups - src_basenames = set(os.listdir(src_dir)) + try: + src_basenames = set(os.listdir(src_dir)) + except os.error: + sys.stderr.write('Cannot access directory: %r\n' % src_dir) + src_basenames = [] if opts.verbose: print 'Examining directory', src_dir _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Thu May 31 2012 - 20:37:42 GMT
This archive was generated by hypermail 2.3.0 : Thu May 31 2012 - 20:47:03 GMT