mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-15 20:31:08 +00:00
flak8-fy
Gbp-Dch: Ignore Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
parent
622f550cc9
commit
097eea7d5f
@ -22,6 +22,7 @@ from ubuntutools.update_maintainer import (update_maintainer,
|
||||
restore_maintainer,
|
||||
MaintainerUpdateException)
|
||||
|
||||
|
||||
def find_debian_dir(depth=6):
|
||||
"""Scans up the directory hierarchy looking for a ./debian dir
|
||||
|
||||
@ -29,13 +30,14 @@ def find_debian_dir(depth=6):
|
||||
:rtype: str
|
||||
:returns: a path to an existing debian/ directory, or None
|
||||
"""
|
||||
for path in ['../'*n or './' for n in list(range(0,depth+1))]:
|
||||
for path in ['../'*n or './' for n in list(range(0, depth+1))]:
|
||||
debian_path = '{}debian'.format(path)
|
||||
if os.path.exists(os.path.join(debian_path, 'control')) \
|
||||
and os.path.exists(os.path.join(debian_path, 'changelog')):
|
||||
and os.path.exists(os.path.join(debian_path, 'changelog')):
|
||||
return debian_path
|
||||
return None
|
||||
|
||||
|
||||
def main():
|
||||
script_name = os.path.basename(sys.argv[0])
|
||||
usage = "%s [options]" % (script_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user