fix ndncert-send-email-challenge: allow both python 2 and 3

This is a fix that allows importing of ConfigParser in both python 2
and python 3. It was found by John Dehart when trying to run on a server
that uses python 3 as default python interpreter.

Change-Id: Id6a384609b1725759eaa41919021af8547857d8e
diff --git a/ndncert-send-email-challenge.py b/ndncert-send-email-challenge.py
index df9ca4d..61d16ff 100755
--- a/ndncert-send-email-challenge.py
+++ b/ndncert-send-email-challenge.py
@@ -3,7 +3,10 @@
 import smtplib
 import argparse
 import socket
-from ConfigParser import SafeConfigParser
+try: # python3
+    from configparser import ConfigParser
+except ImportError: # python2
+    from ConfigParser import SafeConfigParser as ConfigParser
 from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 
@@ -18,7 +21,7 @@
 args = parser.parse_args()
 
 # open config
-confParser = SafeConfigParser()
+confParser = ConfigParser()
 confParser.read('@SYSCONFDIR@/ndncert/ndncert-mail.conf')
 
 # read smtp settings