Changeset 3456


Ignore:
Timestamp:
Jan 31, 2017, 1:25:21 PM (3 years ago)
Author:
mabarracus
Message:

Fix priority of server over local acknowledge

Location:
lliurex-statistics/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-statistics/trunk/fuentes/debian/changelog

    r3416 r3456  
     1lliurex-statistics (0.4-3) xenial; urgency=medium
     2
     3  * Fix priority of server over local acknowledge
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Tue, 31 Jan 2017 13:21:37 +0100
     6
    17lliurex-statistics (0.4-2) xenial; urgency=medium
    28
  • lliurex-statistics/trunk/fuentes/lliurex-statistics.install/usr/sbin/analytics

    r3349 r3456  
    9494            return c.get_variable("","VariablesManager","STATS_ENABLED")
    9595        except:
    96             return '0'
     96            return 'None'
    9797#END def check_server_acknowledge()
    9898
     
    109109def allow_send():
    110110    answer = check_server_acknowledge()
    111     if answer != '1':
    112         answer = check_local_acknowledge()
    113         try:
    114             if answer == "yes":
    115                 debug("allow_send stats by check local acknowledge")
    116                 return True
    117             else:
    118                 debug("deny allow_send stats by check server & local acknowledge")
    119                 return False
    120         except Exception as e:
    121             debug("deny allow_send stats by exception check server & local acknowledge")
    122             return False
    123     else:
     111    if answer == '1':
    124112        debug("allow_send stats by check server acknowledge")
    125113        return True
     114    if answer == '0':
     115        debug("deny allow_send stats by check server acknowledge")
     116        return False
     117   
     118    answer = check_local_acknowledge()
     119    if answer == "yes":
     120        debug("allow_send stats by check local acknowledge")
     121        return True
     122    if answer == 'no':
     123        debug("deny allow_send by check local acknowledge")
     124        return False
     125
     126    debug("deny allow_send stats by exception check server & local acknowledge")
     127    return False
     128
    126129#END def allow_send()
    127130
Note: See TracChangeset for help on using the changeset viewer.