Changeset 10 for trunk


Ignore:
Timestamp:
03/22/05 12:50:55 (19 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

Interval parsing working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r9 r10  
    213213                                source['name'] = line.split( '"' )[1]
    214214
    215                                 if line.find( 'data_source' ) and line[0] != '#':
     215                                if line.find( 'data_source' ) != -1 and line[0] != '#':
    216216
    217217                                        source_words = line.split( '"' )[2].split( ' ' )
    218                                         print line.split( '"' )
    219                                         print source_words
    220218
    221219                                        for word in source_words:
    222220
    223                                                 print 'word %s' %word
    224221                                                valid_interval = 1
    225222
    226223                                                for letter in word:
    227                                                         print 'letter %s' %letter
    228224                                                        if letter not in string.digits:
    229225                                                                valid_interval = 0
    230226
    231                                                 if valid_interval:
     227                                                if valid_interval and len(word) > 0:
    232228                                                        source['interval'] = word
    233229                                                        if (DEBUG_LEVEL>8): print 'polling interval for %s = %s' %(source['name'], source['interval'] )
Note: See TracChangeset for help on using the changeset viewer.