How to use the pywatchman.bser.dumps function in pywatchman

To help you get started, we’ve selected a few pywatchman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / buck / src / com / facebook / buck / json / buck.py View on Github external
result['diagnostics'] = encoded_diagnostics
    if profile is not None:
        result['profile'] = profile
    try:
        return bser.dumps(result)
    except Exception as e:
        # Try again without the values
        result['values'] = []
        if 'diagnostics' not in result:
            result['diagnostics'] = []
        result['diagnostics'].append({
            'message': format_traceback_and_exception(),
            'level': 'fatal',
            'source': 'parse',
        })
        return bser.dumps(result)