Mercurial > templog
diff py/receive.py @ 230:185621f47040
run 2to3
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 10 Apr 2015 23:59:16 +0800 |
parents | e27075b1e088 |
children |
line wrap: on
line diff
--- a/py/receive.py Fri Apr 10 23:55:07 2015 +0800 +++ b/py/receive.py Fri Apr 10 23:59:16 2015 +0800 @@ -28,8 +28,8 @@ def_params = params.Params() - if def_params.viewkeys() != new_params.viewkeys(): - diff = def_params.viewkeys() ^ new_params.viewkeys() + if def_params.keys() != new_params.keys(): + diff = def_params.keys() ^ new_params.keys() return "Mismatching params, %s" % str(diff) for k, v in new_params.items(): @@ -48,7 +48,7 @@ t.close() os.rename(name, config.PARAMS_FILE) - except Exception, e: + except Exception as e: return "Problem: %s" % e try: @@ -56,11 +56,11 @@ if pid < 2: return "Bad pid %d" % pid os.kill(pid, signal.SIGHUP) - except Exception, e: + except Exception as e: return "HUP problem: %s" % e return 'Good Update' if __name__ == '__main__': - print main() + print(main())