Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install:
- pip -q install ordereddict || echo "optional skipped"
- pip -q install coveralls
script:
- travis_wait make test
- travis_wait python setup.py test
- export PACKAGE_VERSION=$(python -c "from jira.version import __version__; print(__version__)")
after_success:
- python travis_after_all.py
Expand Down
15 changes: 10 additions & 5 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2339,19 +2339,24 @@ def deactivate_user(self, username):
url = self._options['server'] + '/secure/admin/user/EditUser.jspa'
self._options['headers']['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
user = self.user(username)
userInfo = { 'inline':'true', 'decorator':'dialog', 'username':user.name,
'fullName':user.displayName, 'email':user.emailAddress, 'editName':user.name
}
userInfo = {
'inline': 'true',
'decorator': 'dialog',
'username': user.name,
'fullName': user.displayName,
'email': user.emailAddress,
'editName': user.name
}
try:
r = self._session.post( url, headers=self._options['headers'], data = userInfo)
r = self._session.post(url, headers=self._options['headers'], data=userInfo)
if r.status_code == 200:
return True
else:
logging.warning(
'Got response from deactivating %s: %s' % (username, r.status_code))
return r.status_code
except Exception as e:
print("Error Deactivating %s: %s" % (username, e) )
print("Error Deactivating %s: %s" % (username, e))

def reindex(self, force=False, background=True):
"""
Expand Down
2 changes: 1 addition & 1 deletion jira/utils/lru_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __hash__(self):

def _make_key(args, kwds, typed,
kwd_mark=(object(),),
fasttypes={int, str, frozenset, type(None)},
fasttypes=set([int, str, frozenset, type(None)]),
sorted=sorted, tuple=tuple, type=type, len=len):
'Make a cache key from optionally typed positional and keyword arguments'
key = args
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ def __init__(self):
self.project_a = prefix + 'A' # old XSS
self.project_a_name = "Test user=%s key=%s A" \
% (getpass.getuser(), self.project_a)
self.project_b = prefix + 'B' # old BULK
self.project_b_name = "Test user=%s key=%s B" \
% (getpass.getuser(), self.project_b)
self.project_b = prefix + 'B' # old BULK

# TODO: fin a way to prevent SecurityTokenMissing for On Demand
# https://jira.atlassian.com/browse/JRA-39153
Expand Down