Skip to content

Commit

Permalink
[ 227] Fix README example rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alanking committed Oct 23, 2024
1 parent bcf1d13 commit 5f10491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ With the below rule contained anywhere in the Python rulebase:
```
def testRule(rule_args, callback, rei):
from irods_errors import USER_FILE_DOES_NOT_EXIST
check_err = lambda e,errcode: e.message.startswith('[iRods__Error__Code:{}]'.format(errcode))
check_err = lambda e,errcode: str(e).startswith('[iRods__Error__Code:{}]'.format(errcode))
try:
ret_val = callback.msiObjStat(rule_args[0], irods_types.RodsObjStat())
except RuntimeError, e:
except RuntimeError as e:
if check_err(e, USER_FILE_DOES_NOT_EXIST):
callback.writeLine('serverLog', 'ERROR in testRule: "'+rule_args[0]+'" not found')
else:
Expand Down

0 comments on commit 5f10491

Please sign in to comment.