summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/envelope.py19
-rw-r--r--alot/settings/manager.py6
2 files changed, 3 insertions, 22 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 25fdeb18..26a80050 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -225,7 +225,6 @@ class SendCommand(Command):
msg = self.mail
if not isinstance(msg, email.message.Message):
msg = email.message_from_string(self.mail)
-<<<<<<< HEAD
address = msg.get('From', '')
logging.debug("FROM: \"%s\"" % address)
try:
@@ -235,21 +234,6 @@ class SendCommand(Command):
ui.notify('no accounts set', priority='error')
return
logging.debug("ACCOUNT: \"%s\"" % account.address)
-=======
- _, saddr = email.utils.parseaddr(msg.get('From', ''))
- account = settings.get_account_by_address(saddr)
- if account is None:
- if not settings.get_accounts():
- ui.notify('no accounts set', priority='error')
- return
- else:
- account = settings.get_accounts()[0]
-
- # make sure self.mail is a string
- logging.debug(self.mail.__class__)
- if isinstance(self.mail, email.message.Message):
- self.mail = str(self.mail)
->>>>>>> py3k: convert email.Utils to email.utils
# define callback
def afterwards(_):
@@ -515,7 +499,6 @@ class SignCommand(Command):
except GPGProblem as e:
envelope.sign = False
ui.notify(str(e), priority='error')
-<<<<<<< HEAD
return
else:
try:
@@ -524,8 +507,6 @@ class SignCommand(Command):
envelope.sign = False
ui.notify('Unable to find a matching account',
priority='error')
-=======
->>>>>>> py3k: Replace 'e.message' with 'str(e)' when handling exceptions
return
if not acc.gpg_key:
envelope.sign = False
diff --git a/alot/settings/manager.py b/alot/settings/manager.py
index 3375f74d..6693bb1c 100644
--- a/alot/settings/manager.py
+++ b/alot/settings/manager.py
@@ -176,12 +176,12 @@ class SettingsManager(object):
value = section[key]
- if isinstance(value, (str, unicode)):
+ if isinstance(value, str):
section[key] = expand_environment_and_home(value)
elif isinstance(value, (list, tuple)):
new = list()
for item in value:
- if isinstance(item, (str, unicode)):
+ if isinstance(item, str):
new.append(expand_environment_and_home(item))
else:
new.append(item)
@@ -529,7 +529,7 @@ class SettingsManager(object):
def represent_datetime(self, d):
"""
- turns a given datetime obj into a unicode string representation.
+ turns a given datetime obj into a string representation.
This will:
1) look if a fixed 'timestamp_format' is given in the config