Ignore:
Timestamp:
May 25, 2010 11:15:55 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
f038da1
Parents:
da2208a
Message:

Wholesale change of IOError to EnvironmentError? for file operations. Lots of
uncaught EnvironmentErrors? were causing spurious error conditions, e.g. on disk
full.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/allocate_project.py

    rda2208a rd3c8759  
    102102            try:
    103103                read_simple_accessdb(access_db, self.auth, 'allocate')
    104             except IOError, e:
     104            except EnvironmentError, e:
    105105                raise service_error(service_error.internal,
    106106                        "Error reading accessDB %s: %s" % (access_db, e))
     
    132132                self.log.debug("[allocation]: Read state from %s" % \
    133133                        self.state_filename)
    134             except IOError, e:
     134            except EnvironmentError, e:
    135135                self.log.warning(("[allocation]: No saved state: " +\
    136136                        "Can't open %s: %s") % (self.state_filename, e))
     
    154154                f = open(self.state_filename, 'w')
    155155                pickle.dump(self.state, f)
    156             except IOError, e:
     156            except EnvironmentError, e:
    157157                self.log.error("Can't write file %s: %s" % \
    158158                        (self.state_filename, e))
     
    195195        try:
    196196            dnull = open("/dev/null", "w")
    197         except IOError:
     197        except EnvironmentError:
    198198            self.log.warn("[run_cmd]: failed to open /dev/null for redirect")
    199199            dnull = None
Note: See TracChangeset for help on using the changeset viewer.