On 2013-03-25 16:46, Ritesh Raj Sarraf wrote: > Package: release.debian.org > Severity: normal > User: [email protected] > Usertags: unblock > > [...] > > unblock lio-utils/3.1+git2.fd0b34fd-2 > > [...] > > ++def fd_get_buffered_mode(value): > ++ > ++ off = value.index(' Mode: ') > ++ off += 7 > ++ fd_dev_mode_tmp = value[off:] > ++ fd_dev_mode = fd_dev_mode_tmp.split(' ') > ++ if re.search('Buffered', fd_dev_mode[0]): ^^^^^^^^^^^^^^^^^^^^
A re.search is overkill when the "regex" is a fixed string (and not a pattern). A call to .index would have worked equally well (possibly with slightly less overhead) > ++ fd_dev_mode_str = ",fd_buffered_io=1" > ++ else: > ++ fd_dev_mode_str = "" > ++ > ++ return fd_dev_mode_str > ++ > [...] Unblocked, thanks. ~Niels -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

