Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

thgconfig: catch registry read errors

Changeset e7a5e84955a3

Parent 17df09850ba3

by Steve Borho

Changes to one file · Browse files at e7a5e84955a3 Showing diff from parent 17df09850ba3 Diff from another changeset...

 
272
273
274
275
 
276
277
278
 
591
592
593
594
 
595
596
597
 
618
619
620
621
 
622
623
624
 
272
273
274
 
275
276
277
278
 
591
592
593
 
594
595
596
597
 
618
619
620
 
621
622
623
624
@@ -272,7 +272,7 @@
  self.diff_frame = self.add_page(notebook, _('Diff'))   self.fill_frame(self.diff_frame, _diff_info)   - if not configrepo: # and os.name == 'nt': + if not configrepo and os.name == 'nt':   self.shellframe = self.add_page(notebook, _('Shell Ext'))   self.fill_shell_frame(self.shellframe)   @@ -591,7 +591,7 @@
  except EnvironmentError: pass   try: promoteditems = QueryValueEx(hkey, 'PromotedItems')[0]   except EnvironmentError: pass - except ImportError: + except (ImportError, WindowsError):   pass     self.shellapps.set_text(shellapps) @@ -618,7 +618,7 @@
  if check.get_active():   promoted.append(cmd)   try: - from _winreg import HKEY_CURRENT_USER, OpenKey, SetValue + from _winreg import HKEY_CURRENT_USER, CreateKey, SetValue   hkey = CreateKey(HKEY_CURRENT_USER, r"Software\TortoiseHg")   SetValue(hkey, 'ShellApps', shellapps)   SetValue(hkey, 'EnableOverlays', overlayenable)