Skip to content

Commit

Permalink
Improve readability of comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Aug 6, 2024
1 parent 5fdc7c4 commit 7a2a8c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion browse.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def transform(row):
# Replace, %, _ and \ since iRODS does not handle those correctly.
# HdR this can only be done in a situation where search_type is NOT status!
# Status description must be kept in tact.
if not search_type == 'status':
if search_type != 'status':
search_string = search_string.replace("\\", "\\\\")
search_string = search_string.replace("%", "\%")
search_string = search_string.replace("_", "\_")
Expand Down
2 changes: 1 addition & 1 deletion policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def py_acPreProcForModifyAVUMetadata(ctx, option, obj_type, obj_name, attr, valu

if space in [pathutil.Space.RESEARCH, pathutil.Space.DEPOSIT] and attr == constants.IISTATUSATTRNAME:
# Research or deposit folder status change. Validate.
if not unit == '':
if unit != '':
return policy.fail('Invalid status attribute')
if option not in ['set', 'rm', 'rmw']:
# "add" has no meaning on the status attribute, as there must
Expand Down

0 comments on commit 7a2a8c5

Please sign in to comment.