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.Dismiss alert
$ qore -n -l SftpPoller -e 'class MySftpPoller inherits SftpPoller {constructor(SFTPClient sftp, hash nconf): SftpPoller(sftp, nconf) {} postSingleFileEvent(hash fih) {} singleFileEvent(hash fih) {}} MySftpPoller a(new SFTPClient("sftp://localhost:22"), {"regex_mask": ""});'
unhandled QORE System exception thrown in TID 1 at 2019-04-16 13:14:11.973498 Tue +02:00 (CEST) in SftpPoller::constructor() (/usr/share/qore-modules/SftpPoller.qm:316 (Qore user code))
INVALID-MEMBER: 'regex_mask' is not a registered member of class 'MySftpPoller'
call stack:
2: SftpPoller::constructor() (<command-line>:1 (Qore user code))
1: MySftpPoller::constructor() (<command-line>:1 (Qore user code))
This is because of how SftpPoller accepts arguments, specifically for regex_mask:
if (conf.regex_mask) {
mask = remove conf.regex_mask;
re = True;
conf -= "mask";
}
# set options
self += conf;
-> if regex_mask evaluates to False in bool context, SftpPoller considers it not being in the conf hash and doesn't remove it (but it is there) and then it fails when it tries to assign the rest of the hash to its' member variables.
The text was updated successfully, but these errors were encountered:
(and fails not very transparently instead)
This is because of how SftpPoller accepts arguments, specifically for
regex_mask
:-> if regex_mask evaluates to False in bool context, SftpPoller considers it not being in the conf hash and doesn't remove it (but it is there) and then it fails when it tries to assign the rest of the hash to its' member variables.
The text was updated successfully, but these errors were encountered: