Skip to content

Commit 69e35da

Browse files
committed
[#227] Fix README example rule
1 parent ef4ca71 commit 69e35da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ With the below rule contained anywhere in the Python rulebase:
150150
```
151151
def testRule(rule_args, callback, rei):
152152
from irods_errors import USER_FILE_DOES_NOT_EXIST
153-
check_err = lambda e,errcode: e.message.startswith('[iRods__Error__Code:{}]'.format(errcode))
153+
check_err = lambda e,errcode: str(e).startswith('[iRods__Error__Code:{}]'.format(errcode))
154154
try:
155155
ret_val = callback.msiObjStat(rule_args[0], irods_types.RodsObjStat())
156-
except RuntimeError, e:
156+
except RuntimeError as e:
157157
if check_err(e, USER_FILE_DOES_NOT_EXIST):
158158
callback.writeLine('serverLog', 'ERROR in testRule: "'+rule_args[0]+'" not found')
159159
else:

0 commit comments

Comments
 (0)