mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-24 07:11:29 +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,
|
restore_maintainer,
|
||||||
MaintainerUpdateException)
|
MaintainerUpdateException)
|
||||||
|
|
||||||
|
|
||||||
def find_debian_dir(depth=6):
|
def find_debian_dir(depth=6):
|
||||||
"""Scans up the directory hierarchy looking for a ./debian dir
|
"""Scans up the directory hierarchy looking for a ./debian dir
|
||||||
|
|
||||||
@ -29,13 +30,14 @@ def find_debian_dir(depth=6):
|
|||||||
:rtype: str
|
:rtype: str
|
||||||
:returns: a path to an existing debian/ directory, or None
|
: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)
|
debian_path = '{}debian'.format(path)
|
||||||
if os.path.exists(os.path.join(debian_path, 'control')) \
|
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 debian_path
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
script_name = os.path.basename(sys.argv[0])
|
script_name = os.path.basename(sys.argv[0])
|
||||||
usage = "%s [options]" % (script_name)
|
usage = "%s [options]" % (script_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user