Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed Sep 22, 2021
1 parent 8490027 commit 7037bb5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/unshrtn.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

logging.basicConfig(filename="unshorten.log", level=logging.INFO)


def unshrtn_obj(obj):
"""Pass in an object and have all the object returned with additional
"""Pass in an object and have all the object returned with additional
unshortened_url keys
"""
if type(obj) == list:
Expand Down Expand Up @@ -64,6 +65,7 @@ def unshrtn_obj(obj):

return {**obj, "unshortened_url": resp["long"]}


def rewrite_line(line):
try:
data = json.loads(line)
Expand All @@ -73,6 +75,7 @@ def rewrite_line(line):
logging.error(e)
return line


def main():
global unshrtn_url, retries, wait
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -116,5 +119,6 @@ def main():
if line != "\n":
print(line)


if __name__ == "__main__":
main()

0 comments on commit 7037bb5

Please sign in to comment.