Changeset 58


Ignore:
Timestamp:
04/11/05 11:04:24 (17 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

  • Added catch of exception that happens in a rare case when trying mkdirs while targetdir allready exists. I noticed this happening in the weekend testing run.

(This shouldn't be happening because of the if-statement
not sure what is causing it, weird..)

  • Will now ignore a 'File exists' Exception of mkdirs, all other exceptions still cause abort
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r57 r58  
    800800
    801801                if not os.path.exists( rrd_dir ):
    802                         os.makedirs( rrd_dir )
     802
     803                        try:
     804                                os.makedirs( rrd_dir )
     805
     806                        except OSError, msg:
     807
     808                                if msg.find( 'File exists' ) != -1:
     809
     810                                        # Ignore exists errors
     811                                        pass
     812
     813                                else:
     814
     815                                        print msg
     816                                        return
     817
    803818                        debug_msg( 9, 'created dir %s' %( str(rrd_dir) ) )
    804819
Note: See TracChangeset for help on using the changeset viewer.