Browse Source

tweaked import formatting for python 2 and 3

Daniel Roesler 9 years ago
parent
commit
ee20af39be
1 changed files with 4 additions and 3 deletions
  1. 4 3
      acme_tiny.py

+ 4 - 3
acme_tiny.py

@@ -1,9 +1,10 @@
 #!/usr/bin/env python
 import argparse, subprocess, json, os, sys, base64, binascii, time, hashlib, re, copy, textwrap
 try:
-    from urllib.request import urlopen
-except ImportError:  # Python 2
-    from urllib2 import urlopen
+    from urllib.request import urlopen # Python 3
+except ImportError:
+    from urllib2 import urlopen # Python 2
+
 #CA = "https://acme-staging.api.letsencrypt.org"
 CA = "https://acme-v01.api.letsencrypt.org"