python-rrdtool try except rrdtool.error module object has no attribute error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaf3773
    New Member
    • Jan 2012
    • 20

    python-rrdtool try except rrdtool.error module object has no attribute error

    I have this code that gives this error on Linux and will be grateful if you can help
    Code:
    import rrdtool
    
    try:      
          ret_asd = rrdtool.update(myfile.rrd,'N:%s:%s' %(metric1, metric2));    
    except rrdtool.error, e:
          print e
    When i run the above i get the below error

    Code:
    except rrdtool.error, e:
    AttributeError: 'module' object has no attribute 'error'
    The code is intended to skip the below error
    Code:
    illegal attempt to update using time 1363358441 when last update time is 1363358441 (minimum one second step)
    Appreciate if you can help me get a solution for this

    Thanks
Working...