Page MenuHomePhorge

D3626.id10406.diff
No OneTemporary

D3626.id10406.diff

diff --git a/wallace/__init__.py b/wallace/__init__.py
--- a/wallace/__init__.py
+++ b/wallace/__init__.py
@@ -31,7 +31,10 @@
import struct
import sys
import tempfile
-from threading import _Timer
+try:
+ from threading import _Timer
+except:
+ from threading import Timer as _Timer
import time
import pykolab
diff --git a/wallace/module_gpgencrypt.py b/wallace/module_gpgencrypt.py
--- a/wallace/module_gpgencrypt.py
+++ b/wallace/module_gpgencrypt.py
@@ -22,8 +22,14 @@
import time
from email import message_from_string
-from email.MIMEBase import MIMEBase
-from email.MIMEText import MIMEText
+try:
+ from email.MIMEBase import MIMEBase
+except:
+ from email.mime.base import MIMEBase
+try:
+ from email.MIMEText import MIMEText
+except:
+ from email.mime.text import MIMEText
from email.parser import Parser
from email.utils import formataddr
from email.utils import getaddresses
diff --git a/wallace/modules.py b/wallace/modules.py
--- a/wallace/modules.py
+++ b/wallace/modules.py
@@ -65,7 +65,7 @@
module_name = filename.replace('.py', '')
name = module_name.replace('module_', '')
# print("exec(\"from %s import __init__ as %s_register\")" % (module_name,name))
- exec("from %s import __init__ as %s_register" % (module_name, name))
+ exec("from .%s import __init__ as %s_register" % (module_name, name))
exec("%s_register()" % (name))
for dirname in dirnames:
@@ -408,7 +408,7 @@
name = module_name.replace('module_', '')
# TODO: Error recovery from incomplete / incorrect modules.
exec(
- "from %s.%s import __init__ as %s_%s_register" % (
+ "from .%s.%s import __init__ as %s_%s_register" % (
module,
module_name,
module,

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 31, 10:03 AM (21 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10076319
Default Alt Text
D3626.id10406.diff (1 KB)

Event Timeline