Verified Commit cf858965 authored by anarcat's avatar anarcat
Browse files

flake8/black

parent 686dde76
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -14,20 +14,30 @@ def main():
            try:
                blob = json.loads(line)
            except ValueError as e:
                logging.warning("failed to parse %s:%d: %s", fileinput.filename(), fileinput.lineno(), e)
                logging.warning(
                    "failed to parse %s:%d: %s",
                    fileinput.filename(),
                    fileinput.lineno(),
                    e,
                )
                continue
            for param in blob.get('params', []):
            for param in blob.get("params", []):
                try:
                    email = param.get('value', {}).get('email')
                    email = param.get("value", {}).get("email")
                except AttributeError:
                    logging.debug("ignoring string value: %s", param.get('value'))
                    logging.debug("ignoring string value: %s", param.get("value"))
                    continue
                if email:
                    logging.info("email: %r", email)
    except OSError as e:
        logging.error("error while processing file %s at line %s: %s, skipping", fileinput.filename(), fileinput.lineno(), e)
        logging.error(
            "error while processing file %s at line %s: %s, skipping",
            fileinput.filename(),
            fileinput.lineno(),
            e,
        )
        fileinput.nextfile()


if __name__ == '__main__':
if __name__ == "__main__":
    main()