enable=
catching-non-exception,
consider-using-in,
+ inconsistent-return-statements,
return-in-init,
trailing-whitespace,
undefined-variable,
return self.conn.check_ok()
except Exception as e:
reraise(ClientError(e))
+ # reraise doesn't return
+ return None
def check_busy(self):
if self._busy:
self.onclose() # Unbusy
self.objcache = None
return self.suggest_packs() # Returns last idx received
+ return None
def close(self):
id = self._end()
opt = ls.opts_from_cmdline(args, onabort=OptionError, pwd=pwd_str)
except OptionError as e:
log('error: %s' % e)
- return
+ return None
return ls.within_repo(repo, opt, out, pwd_str)
except Exception as e2:
log('Error printing traceback: %s\n' % e2)
log('\nError in completion: %s\n' % e)
+ return None
optspec = """
# Return None since read doesn't need the file atm...
# If we *do* return the file, it'll show up as the last argument
#return vfs.fopen(repo, item)
+ return None
def read(self, path, size, offset):
path = argv_bytes(path)
return item.src.hash, unhexlify(commit_items.tree)
misuse('destination is not an ancestor of source for %s'
% spec_msg(item.spec))
+ # misuse() doesn't return
+ return None
def resolve_append(spec, src_repo, dest_repo):
def exo(cmd, shell=False, preexec_fn=None, close_fds=True):
logcmd(cmd)
- if not dry_run:
- return helpers.exo(cmd, shell=shell, preexec_fn=preexec_fn,
- close_fds=close_fds)[0]
+ if dry_run:
+ return b''
+ return helpers.exo(cmd, shell=shell, preexec_fn=preexec_fn,
+ close_fds=close_fds)[0]
def redirect_dup_output():
os.dup2(1, 3)
or ((auto or force) and len(infilenames) < 2) \
or (force and not total):
debug1('midx: nothing to do.\n')
- return
+ return None
pages = int(total/SHA_PER_PAGE) or 1
bits = int(math.ceil(math.log(pages, 2)))
path = path[1:]
if b'/' in path:
return True
+ return False
def parse_owner_mappings(type, options, fatal):
"""Traverse the options and parse all --map-TYPEs, or call Option.fatal()."""
link_paths = hlink_db.node_paths(ent.dev, ent.ino)
if link_paths:
return link_paths[0]
+ return None
total = ftotal = 0
if opt.progress:
hidden_shown=show_hidden,
dir_contents=_dir_contents(self.repo, resolution,
show_hidden=show_hidden))
+ return None
@gen.coroutine
def _get_file(self, repo, path, resolved):
elif name.endswith(b'.bupm'):
return (name[:-5],
BUP_CHUNKED if stat.S_ISDIR(mode) else BUP_NORMAL)
- else:
- return (name, BUP_NORMAL)
+ return (name, BUP_NORMAL)
def calc_hash(type, content):
if wait:
p.wait()
return p.returncode
+ return None
def restart(self):
self.close()
if isinstance(x, compat.str_type):
return squote(x)
assert False
+ # some versions of pylint get confused
+ return None
def shstr(cmd):
"""Return a shell quoted string for cmd if it's a sequence, else cmd.
if exctype == KeyboardInterrupt:
log('\nInterrupted.\n')
else:
- return oldhook(exctype, value, traceback)
+ oldhook(exctype, value, traceback)
sys.excepthook = newhook
return True
if tag == b'res:':
return True
+ return False
def cache_get(key):
global _cache
for e in l:
if e.name == ename:
return e
+ return None
def test_index_negative_timestamps(tmpdir):
# Makes 'foo' exist