aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/create_remote_repo.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-09-09 12:49:42 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-12 08:52:14 +0200
commit7b6bee2a57c641bc8e97312a42d1ab26ad13f838 (patch)
tree2063d9b537422d385a93fcd25c103c92041528cb /gbp/scripts/create_remote_repo.py
parentb4ce4160181dd942c91ac02a253073517c77e1b4 (diff)
create_remote_repo: flake8 clean
Diffstat (limited to 'gbp/scripts/create_remote_repo.py')
-rw-r--r--gbp/scripts/create_remote_repo.py45
1 files changed, 23 insertions, 22 deletions
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py
index ec65c8d7..024e4827 100644
--- a/gbp/scripts/create_remote_repo.py
+++ b/gbp/scripts/create_remote_repo.py
@@ -102,15 +102,15 @@ def parse_url(remote_url, name, pkg, template_dir=None):
base = ""
path = frags.path
- remote = { 'pkg' : pkg,
- 'url' : remote_url % { 'pkg': pkg },
- 'dir' : path % { 'pkg': pkg },
- 'base': base,
- 'host': host,
- 'port': port,
- 'name': name,
- 'scheme': scheme,
- 'template-dir': template_dir}
+ remote = {'pkg': pkg,
+ 'url': remote_url % {'pkg': pkg},
+ 'dir': path % {'pkg': pkg},
+ 'base': base,
+ 'host': host,
+ 'port': port,
+ 'name': name,
+ 'scheme': scheme,
+ 'template-dir': template_dir}
return remote
@@ -124,19 +124,20 @@ def build_remote_script(remote, branch):
if args['template-dir']:
args['git-init-args'] += (' --template=%s'
% args['template-dir'])
- remote_script_pattern = ['',
- 'set -e',
- 'umask 002',
- 'if [ -d %(base)s"%(dir)s" ]; then',
- ' echo "Repository at \"%(base)s%(dir)s\" already exists - giving up."',
- ' exit 1',
- 'fi',
- 'mkdir -p %(base)s"%(dir)s"',
- 'cd %(base)s"%(dir)s"',
- 'git init %(git-init-args)s',
- 'echo "%(pkg)s packaging" > description',
- 'echo "ref: refs/heads/%(branch)s" > HEAD',
- '' ]
+ remote_script_pattern = \
+ ['',
+ 'set -e',
+ 'umask 002',
+ 'if [ -d %(base)s"%(dir)s" ]; then',
+ ' echo "Repository at \"%(base)s%(dir)s\" already exists - giving up."',
+ ' exit 1',
+ 'fi',
+ 'mkdir -p %(base)s"%(dir)s"',
+ 'cd %(base)s"%(dir)s"',
+ 'git init %(git-init-args)s',
+ 'echo "%(pkg)s packaging" > description',
+ 'echo "ref: refs/heads/%(branch)s" > HEAD',
+ '']
remote_script = '\n'.join(remote_script_pattern) % args
return remote_script