{"push_id":557167801,"size":1,"distinct_size":1,"ref":"refs/heads/fix_syslog2","head":"f01384cbd759148957b2e390a88ca6c6a1ab9d19","before":"55f1128e9c43bcfe0682347f215615ad77c40bcd","commits":[{"sha":"f01384cbd759148957b2e390a88ca6c6a1ab9d19","author":{"email":"ca2fa1011fb7670ca19d83dfe32f099dd43b790f@f-secure.com","name":"Jari Sukanen"},"message":"pglookout: prefer simplejson over json, if simplejson is available\n\nAfter the change 8816adbbb, pglookout stopped working with Python 2.6 as\njson behaves slightly differently when compared to simplejson. Namely,\njson library converts all strings to unicode whereas simplejson left strings\nas str if the whole input is ASCII only. I believe this is an issue many\nhave faced with simplejson: https://code.google.com/p/simplejson/issues/detail?id=40\n\nTo make it work, prefer simplejson over json when it is available.\n\nThis should prevent following tracebacks:\n\n2015-01-26 18:28:47,551pglookoutDEBUGLoading JSON config from: '/etc/pglookout/pglookout.json', signal: None, frame: None\nTraceback (most recent call last):\n  File \"/usr/bin/pglookout\", line 9, in <module>\n    load_entry_point('pglookout==1.0.0', 'console_scripts', 'pglookout')()\n  File \"/usr/lib/python2.6/dist-packages/pglookout/pglookout.py\", line 651, in main\n    pglookout = PgLookout(args[0])\n  File \"/usr/lib/python2.6/dist-packages/pglookout/pglookout.py\", line 114, in __init__\n    self.observer_state, self.create_alert_file)\n  File \"/usr/lib/python2.6/dist-packages/pglookout/pglookout.py\", line 524, in __init__\n    self.log.debug(\"Initialized ClusterMonitor with: %r\", cluster_state)\n  File \"/usr/lib/python2.6/logging/__init__.py\", line 1044, in debug\n    self._log(DEBUG, msg, args, **kwargs)\n  File \"/usr/lib/python2.6/logging/__init__.py\", line 1173, in _log\n    self.handle(record)\n  File \"/usr/lib/python2.6/logging/__init__.py\", line 1183, in handle\n    self.callHandlers(record)\n  File \"/usr/lib/python2.6/logging/__init__.py\", line 1220, in callHandlers\n    hdlr.handle(record)\n  File \"/usr/lib/python2.6/logging/__init__.py\", line 679, in handle\n    self.emit(record)\n  File \"/usr/lib/python2.6/logging/handlers.py\", line 783, in emit\n    self.mapPriority(record.levelname)),\n  File \"/usr/lib/python2.6/logging/handlers.py\", line 749, in encodePriority\n    return (facility << 3) | priority\nTypeError: unsupported operand type(s) for <<: 'unicode' and 'int'","distinct":true,"url":"https://api.github.com/repos/peekeri/pglookout/commits/f01384cbd759148957b2e390a88ca6c6a1ab9d19"}]}