Mercurial > piecrust2
comparison piecrust/admin/scm/git.py @ 812:82509bce94ca
internal: PEP8 fixup for admin panel code.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 20 Dec 2016 22:20:18 -0800 |
parents | 5e91bc0e3b4d |
children |
comparison
equal
deleted
inserted
replaced
811:c7393ce2dde7 | 812:82509bce94ca |
---|---|
22 if line.startswith('?? '): | 22 if line.startswith('?? '): |
23 path = line[3:].strip() | 23 path = line[3:].strip() |
24 if path[-1] == '/': | 24 if path[-1] == '/': |
25 import glob | 25 import glob |
26 res.new_files += [ | 26 res.new_files += [ |
27 f for f in glob.glob(path + '**', recursive=True) | 27 f for f in glob.glob(path + '**', recursive=True) |
28 if f[-1] != '/'] | 28 if f[-1] != '/'] |
29 else: | 29 else: |
30 res.new_files.append(path) | 30 res.new_files.append(path) |
31 elif line.startswith(' M '): | 31 elif line.startswith(' M '): |
32 res.edited_files.append(line[3:]) | 32 res.edited_files.append(line[3:]) |
33 return res | 33 return res |
54 exe.append(cmd) | 54 exe.append(cmd) |
55 exe += args | 55 exe += args |
56 | 56 |
57 logger.debug("Running Git: " + str(exe)) | 57 logger.debug("Running Git: " + str(exe)) |
58 proc = subprocess.Popen( | 58 proc = subprocess.Popen( |
59 exe, stdout=subprocess.PIPE, cwd=self.root_dir) | 59 exe, stdout=subprocess.PIPE, cwd=self.root_dir) |
60 out, _ = proc.communicate() | 60 out, _ = proc.communicate() |
61 | 61 |
62 encoded_out = _s(out) | 62 encoded_out = _s(out) |
63 return encoded_out | 63 return encoded_out |
64 | 64 |