address @dignifiedquire err.to_string() comment and avoid extra virtualenv building

This commit is contained in:
holger krekel
2019-11-22 01:55:32 +01:00
parent bb396685ab
commit 7e3c61eb41
2 changed files with 11 additions and 10 deletions

View File

@@ -31,11 +31,12 @@ ssh $SSHTARGET <<_HERE
export TARGET=release
export DCC_PY_LIVECONFIG=$DCC_PY_LIVECONFIG
rm -rf virtualenv venv
virtualenv -q -p python3.7 venv
source venv/bin/activate
#we rely on tox/virtualenv being available in the host
#rm -rf virtualenv venv
#virtualenv -q -p python3.7 venv
#source venv/bin/activate
set -x
pip install -q tox virtualenv
#pip install -q tox virtualenv
bash ci_scripts/run-python-test.sh
_HERE

View File

@@ -219,12 +219,12 @@ impl Imap {
context.stock_string_repl_str2(
StockMessage::ServerResponse,
format!("{}:{}", imap_server, imap_port),
format!("{}", err),
err.to_string(),
)
};
// IMAP connection failures are reported to users
emit_event!(context, Event::ErrorNetwork(message));
return Err(Error::ImapConnectionFailed(format!("{}", err)));
return Err(Error::ImapConnectionFailed(err.to_string()));
}
};
@@ -779,7 +779,7 @@ impl Imap {
// typically also need to change the Insecure branch.
IdleHandle::Secure(mut handle) => {
if let Err(err) = handle.init().await {
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
}
let (idle_wait, interrupt) = handle.wait_with_timeout(timeout);
@@ -817,13 +817,13 @@ impl Imap {
// means that we waited long (with idle_wait)
// but the network went away/changed
self.trigger_reconnect();
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
}
}
}
IdleHandle::Insecure(mut handle) => {
if let Err(err) = handle.init().await {
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
}
let (idle_wait, interrupt) = handle.wait_with_timeout(timeout);
@@ -861,7 +861,7 @@ impl Imap {
// means that we waited long (with idle_wait)
// but the network went away/changed
self.trigger_reconnect();
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
}
}
}