Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

sync: catch EnvironmentError from config file writes

EnvironmentError is the base class of IOError and OSError, and OSError is
the base class of WindowsError. Random file IO on Windows results in
WindowsError being raised (thank you virus checkers and brain-dead permissions
policies).

Changeset c2f54c8739c8

Parent bd842d036b1b

by Steve Borho

Changes to one file · Browse files at c2f54c8739c8 Showing diff from parent bd842d036b1b Diff from another changeset...

 
370
371
372
373
 
374
375
376
 
460
461
462
463
 
464
465
466
 
519
520
521
522
 
523
524
525
 
628
629
630
631
 
632
633
634
 
370
371
372
 
373
374
375
376
 
460
461
462
 
463
464
465
466
 
519
520
521
 
522
523
524
525
 
628
629
630
 
631
632
633
634
@@ -370,7 +370,7 @@
  self.repo.incrementBusyCount()   try:   wconfig.writefile(cfg, fn) - except IOError, e: + except EnvironmentError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self)   self.repo.decrementBusyCount() @@ -460,7 +460,7 @@
  try:   cfg.set('tortoisehg', 'postpull', self.getValue())   wconfig.writefile(cfg, fn) - except IOError, e: + except EnvironmentError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self)   self.repo.decrementBusyCount() @@ -519,7 +519,7 @@
  self.repo.incrementBusyCount()   try:   wconfig.writefile(cfg, fn) - except IOError, e: + except EnvironmentError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self)   self.repo.decrementBusyCount() @@ -628,7 +628,7 @@
  self.repo.incrementBusyCount()   try:   wconfig.writefile(cfg, fn) - except IOError, e: + except EnvironmentError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self)   self.repo.decrementBusyCount()