Skip to content

Commit

Permalink
Back to Python2.
Browse files Browse the repository at this point in the history
python-vobject doesn't support Python3:
skarim/vobject#20
  • Loading branch information
gnoack committed Aug 9, 2016
1 parent ef25fa0 commit a375fa5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions avatars/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ def main():
options = parser.parse_args(sys.argv[1:])

_populate_index_from_vcard(sys.stdin, dry_run=options.dry_run)


if __name__ == "__main__":
main()
9 changes: 6 additions & 3 deletions avatars/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def _lookup(email_address):

def main():
parser = argparse.ArgumentParser(
usage=("%(prog)s --pipe-mail < one_mail.mbox\n"
"%(prog)s --email-address FOO@EXAMPLE.COM"),
usage="%(prog)s [OPTIONS]",
description=__doc__)
parser.add_argument(
"--pipe-mail", dest="pipe_mail",
Expand All @@ -44,4 +43,8 @@ def main():
elif options.email_address:
_lookup(options.email_address)
else:
argparse.error("Missing argument.")
parser.error("Missing argument.")


if __name__ == "__main__":
main()
1 change: 0 additions & 1 deletion avatars/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ def draw_image(filename):

drawing = subprocess.Popen(W3MIMGDISPLAY, stdin=subprocess.PIPE)
commands = "0;1;%s;%s;%s;%s;;;;;%s\n4;\n3;" % (x, y, w, h, filename)
commands = bytes(commands, encoding="utf-8")
drawing.stdin.write(commands)
drawing.communicate()

0 comments on commit a375fa5

Please sign in to comment.