You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
When with redmine.session() fails redminelib does not restore previous used engine.
Example:
rm=redminelib.Redmine('https://redmine.intranet')
# Original engineprint(rm.engine)
try:
withrm.session(impersonate='william_gates'):
# Masked engineprint(rm.engine)
# Some failsrm.issue.create(project_id='test', subject='foo')
exceptredminelib.exceptions.ImpersonateErrorase:
print(e)
# Should be original engine again?print(rm.engine)
Output:
<redminelib.engines.sync.SyncEngine object at 0x03D1B9F0><redminelib.engines.sync.SyncEngine object at 0x040EBD10>
Impersonate login provided doesn't exist or isn't active
<redminelib.engines.sync.SyncEngine object at 0x040EBD10>
The text was updated successfully, but these errors were encountered:
dmlogv
pushed a commit
to dmlogv/python-redmine
that referenced
this issue
Sep 13, 2018
When
with redmine.session()
failsredminelib
does not restore previous used engine.Example:
Output:
The text was updated successfully, but these errors were encountered: