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

shlib: catch KeyErrors in shelve read path

fixes #210

Changeset bd3b973c5dce

Parent 42772e6f7836

by Steve Borho

Changes to one file · Browse files at bd3b973c5dce Showing diff from parent 42772e6f7836 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​shlib.py Stacked
 
89
90
91
92
93
94
 
 
 
 
 
 
95
96
97
 
89
90
91
 
 
 
92
93
94
95
96
97
98
99
100
@@ -89,9 +89,12 @@
  if not os.path.exists(self._path+'.dat'):   return   dbase = shelve.open(self._path) - self._dbappname = dbase['APPNAME'] - self.version = dbase['VERSION'] - self._data.update(dbase.get('DATA', {})) + try: + self._dbappname = dbase['APPNAME'] + self.version = dbase['VERSION'] + self._data.update(dbase.get('DATA', {})) + except KeyError: + pass   dbase.close()     def write(self):