From: Jan Rękorajski Date: Sun, 17 Jan 2021 16:06:50 +0000 (+0100) Subject: Fix loading StringIO on both python2 and python3 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=5e91d16664e085bc7d8967bdd8b2e6216bfed6c0;p=projects%2Fpld-ftp-admin.git Fix loading StringIO on both python2 and python3 --- diff --git a/modules/mailer.py b/modules/mailer.py index bf13ef5..db85f40 100644 --- a/modules/mailer.py +++ b/modules/mailer.py @@ -3,7 +3,10 @@ import time import os import sys -import StringIO +if sys.version_info[0] == 2: + import StringIO +else: + from io import StringIO import config cval=config.value