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/local_emulab_segment.py

    rda2208a rd3c8759  
    4242        try:
    4343            dnull = open("/dev/null", "w")
    44         except IOError:
     44        except EnvironmentError:
    4545            self.log.debug("[cmd_with_timeout]: failed to open /dev/null " + \
    4646                    "for redirect")
     
    107107        try:
    108108            dev_null = open("/dev/null", "a")
    109         except IOError, e:
     109        except EnvironmentError, e:
    110110            self.log.error("[get_state]: can't open /dev/null: %s" %e)
    111111
     
    149149        try:
    150150            dev_null = open("/dev/null", "a")
    151         except IOError, e:
     151        except EnvironmentError, e:
    152152            self.log.error("[get_state]: can't open /dev/null: %s" %e)
    153153
     
    225225                print >>f, self.null
    226226                f.close()
    227             except IOError, e:
     227            except EnvironmentError, e:
    228228                raise service_error(service_error.internal,
    229229                        "Cannot stage null.tcl: %s" % e.strerror)
     
    266266                        self.copy_file("%s/%s" % (lsoftdir, f),
    267267                                "%s/%s" % (softdir, f))
    268         except IOError, e:
     268        except EnvironmentError, e:
    269269            self.log.error("Error copying file: %s" %e)
    270270            return False
Note: See TracChangeset for help on using the changeset viewer.