euscan: PEP8 compliant code

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-08-15 15:37:55 +02:00
parent 2557b74beb
commit 519f335966
4 changed files with 11 additions and 3 deletions

View File

@ -38,6 +38,7 @@ from euscan.out import progress_bar
isatty = os.environ.get('TERM') != 'dumb' and sys.stdout.isatty()
isatty_stderr = os.environ.get('TERM') != 'dumb' and sys.stderr.isatty()
def exit_helper(status):
if CONFIG["format"]:
print(output.get_formatted_output())

View File

@ -53,6 +53,7 @@ def emerge_sync(logger):
"--config-root", settings.PORTAGE_CONFIGROOT]
return _launch_command(cmd, logger)
def emerge_metadata(logger):
"""
Launches an emerge --metadata

View File

@ -20,8 +20,11 @@ def scan_url(pkg, url, options):
cp, ver, rev = portage.pkgsplit(pkg.cpv)
project, filename = re.search("mirror://sourceforge/([^/]+)/(?:.*/)?([^/]+)",
url).groups()
project, filename = re.search(
"mirror://sourceforge/([^/]+)/(?:.*/)?([^/]+)",
url
).groups()
base_url = "http://qa.debian.org/watch/sf.php/%s" % project
file_pattern = regex_from_template(
filename.replace(ver, "${PV}")

View File

@ -165,7 +165,10 @@ def scan_upstream(query, on_progress=None):
cpv = pkg.cpv
uris = parse_src_uri(uris)
uris_expanded = [ from_mirror(uri) if 'mirror://' in uri else uri for uri in uris ]
uris_expanded = [
from_mirror(uri) if 'mirror://' in uri else uri for uri in uris
]
pkg._uris = uris
pkg._uris_expanded = uris_expanded