Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
[MESSAGES CONTROL]
disable=all
enable=
+ consider-using-in,
return-in-init,
trailing-whitespace,
unused-import,
with open(name, 'wb') as destfile:
log('Saving %s\n' % path_msg(name))
write_to_file(srcfile, destfile)
- elif cmd == b'help' or cmd == b'?':
+ elif cmd in (b'help', b'?'):
out.write(b'Commands: ls cd pwd cat get mget help quit\n')
out.flush()
elif cmd in (b'quit', b'exit', b'bye'):
yield (wordstart, word)
word = b''
wordstart = i+1
- elif not inquote and not word and (c == q or c == qq):
+ elif not inquote and not word and c in (q, qq):
# the 'not word' constraint on this is un-sh-like, but do it
# for sanity when autocompleting
inquote = c