Changeset 4179
- Timestamp:
- 06/25/2008 03:09:04 PM (2 months ago)
- Files:
-
- trunk/dabo/__version__.py (modified) (1 diff)
- trunk/dabo/dApp.py (modified) (9 diffs)
- trunk/dabo/dBug.py (modified) (2 diffs)
- trunk/dabo/dColors.py (modified) (1 diff)
- trunk/dabo/dObject.py (modified) (1 diff)
- trunk/dabo/dPref.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/__version__.py
r4173 r4179 19 19 if not _revision[0].isdigit(): 20 20 _revision = None 21 except :21 except IndexError: 22 22 _revision = None 23 23 trunk/dabo/dApp.py
r4171 r4179 74 74 # Don't worry about the .pyc files, since they may not be there 75 75 print "Could not delete %s: %s" % (f, e) 76 except :76 except StandardError, e: 77 77 # In these rare cases, Python has already 'gone away', so just bail 78 78 pass … … 437 437 try: 438 438 localVers = localVers.split(":")[1] 439 except :439 except IndexError: 440 440 # Not a mixed version 441 441 pass … … 527 527 try: 528 528 vers = int(urllib2.urlopen(url).read()) 529 except :529 except ValueError: 530 530 vers = -1 531 except StandardError, e: 532 dabo.errorLog.write(_("Failed to open URL '%s'. Error: %s") % (url, e)) 531 533 localVers = self._currentUpdateVersion(nm) 532 534 retAvailable = (localVers < vers) … … 551 553 try: 552 554 resp = urllib2.urlopen(fileurl % (abbrev, currvers)) 553 except :555 except StandardError, e: 554 556 # No internet access, or Dabo site is down. 555 dabo.errorLog.write(_("Cannot access the Dabo site. "))557 dabo.errorLog.write(_("Cannot access the Dabo site. Error: %s") % e) 556 558 self._resetWebUpdateCheck() 557 559 return None … … 582 584 try: 583 585 vers = int(urllib2.urlopen(url).read()) 584 except :586 except ValueError: 585 587 vers = self._currentUpdateVersion() 586 self.PreferenceManager.setValue("current_version", vers) 588 except StandardError, e: 589 dabo.errorLog.write(_("Cannot access the Dabo site. Error: %s") % e) 590 vers = self._currentUpdateVersion() 591 self.PreferenceManager.setValue("current_version", vers) 587 592 return vers 588 593 … … 887 892 try: 888 893 conn.close() 889 except :890 pass894 except StandardError, e: 895 dabo.errorLog.write(_("Failed to close connection. Error: %s") % e) 891 896 892 897 … … 895 900 try: 896 901 name = ci.Name 897 except :902 except AttributeError: 898 903 # Use a default name 899 904 name = "%s@%s" % (ci.User, ci.Host) … … 1101 1106 try: 1102 1107 ret = self.ActiveForm.BasePrefKey 1103 except: pass 1108 except AttributeError: 1109 pass 1104 1110 if not ret: 1105 1111 try: 1106 1112 ret = self.MainForm.BasePrefKey 1107 except: pass 1113 except AttributeError: 1114 pass 1108 1115 if not ret: 1109 1116 dabo.infoLog.write(_("WARNING: No BasePrefKey has been set for this application.")) … … 1142 1149 try: 1143 1150 f = open(val, "a") 1144 except :1145 dabo.errorLog.write(_("Could not open file: '%s' ") % val)1151 except IOError, e: 1152 dabo.errorLog.write(_("Could not open file: '%s': %s") % (val, e)) 1146 1153 return 1147 1154 else: trunk/dabo/dBug.py
r3702 r4179 61 61 """ 62 62 try: 63 if loggit.fhwr: 64 pass 65 except: 63 loggit.fhwr 64 except AttributeError: 66 65 # ... open it 67 66 fname = dabo.loggitFile … … 75 74 try: 76 75 loggit.fhwr.write(" %s" % ag) 77 except :78 loggit.fhwr.write(" ERR ")76 except StandardError, e: 77 loggit.fhwr.write(" ERR: %s" % e) 79 78 loggit.fhwr.write("\n") 80 79 if kwargs: trunk/dabo/dColors.py
r3054 r4179 232 232 try: 233 233 ret = colorTupleFromHex(color) 234 except :234 except InvalidCharError: 235 235 ret = colorTupleFromString(color) 236 236 return ret trunk/dabo/dObject.py
r3776 r4179 188 188 try: 189 189 methodList = cls.__methodList 190 except :190 except AttributeError: 191 191 methodList = None 192 192 trunk/dabo/dPref.py
r4136 r4179 219 219 try: 220 220 typ = self._typeDict[type(val)] 221 except :222 print "BAD TYPE", type(val)221 except KeyError: 222 dabo.errorLog.write(_("BAD TYPE: %s") % type(val)) 223 223 typ = "?" 224 224 # Convert it to a string that can be properly converted back
