mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
address @dignifiedquire err.to_string() comment and avoid extra virtualenv building
This commit is contained in:
@@ -31,11 +31,12 @@ ssh $SSHTARGET <<_HERE
|
|||||||
export TARGET=release
|
export TARGET=release
|
||||||
export DCC_PY_LIVECONFIG=$DCC_PY_LIVECONFIG
|
export DCC_PY_LIVECONFIG=$DCC_PY_LIVECONFIG
|
||||||
|
|
||||||
rm -rf virtualenv venv
|
#we rely on tox/virtualenv being available in the host
|
||||||
virtualenv -q -p python3.7 venv
|
#rm -rf virtualenv venv
|
||||||
source venv/bin/activate
|
#virtualenv -q -p python3.7 venv
|
||||||
|
#source venv/bin/activate
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
pip install -q tox virtualenv
|
#pip install -q tox virtualenv
|
||||||
bash ci_scripts/run-python-test.sh
|
bash ci_scripts/run-python-test.sh
|
||||||
_HERE
|
_HERE
|
||||||
|
|||||||
12
src/imap.rs
12
src/imap.rs
@@ -219,12 +219,12 @@ impl Imap {
|
|||||||
context.stock_string_repl_str2(
|
context.stock_string_repl_str2(
|
||||||
StockMessage::ServerResponse,
|
StockMessage::ServerResponse,
|
||||||
format!("{}:{}", imap_server, imap_port),
|
format!("{}:{}", imap_server, imap_port),
|
||||||
format!("{}", err),
|
err.to_string(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
// IMAP connection failures are reported to users
|
// IMAP connection failures are reported to users
|
||||||
emit_event!(context, Event::ErrorNetwork(message));
|
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.
|
// typically also need to change the Insecure branch.
|
||||||
IdleHandle::Secure(mut handle) => {
|
IdleHandle::Secure(mut handle) => {
|
||||||
if let Err(err) = handle.init().await {
|
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);
|
let (idle_wait, interrupt) = handle.wait_with_timeout(timeout);
|
||||||
@@ -817,13 +817,13 @@ impl Imap {
|
|||||||
// means that we waited long (with idle_wait)
|
// means that we waited long (with idle_wait)
|
||||||
// but the network went away/changed
|
// but the network went away/changed
|
||||||
self.trigger_reconnect();
|
self.trigger_reconnect();
|
||||||
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
|
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IdleHandle::Insecure(mut handle) => {
|
IdleHandle::Insecure(mut handle) => {
|
||||||
if let Err(err) = handle.init().await {
|
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);
|
let (idle_wait, interrupt) = handle.wait_with_timeout(timeout);
|
||||||
@@ -861,7 +861,7 @@ impl Imap {
|
|||||||
// means that we waited long (with idle_wait)
|
// means that we waited long (with idle_wait)
|
||||||
// but the network went away/changed
|
// but the network went away/changed
|
||||||
self.trigger_reconnect();
|
self.trigger_reconnect();
|
||||||
return Err(Error::ImapIdleProtocolFailed(format!("{}", err)));
|
return Err(Error::ImapIdleProtocolFailed(err.to_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user