PEP8
This commit is contained in:
parent
5ce14bee2c
commit
ee870e2d12
2 changed files with 9 additions and 6 deletions
|
@ -16,13 +16,13 @@ def clone_public_data():
|
||||||
out, error = shell.call(
|
out, error = shell.call(
|
||||||
"git clone -b master --single-branch {} {}".format(
|
"git clone -b master --single-branch {} {}".format(
|
||||||
config.get('public_repo'),
|
config.get('public_repo'),
|
||||||
constants.PUBLIC_DATA_DIR)
|
constants.PUBLIC_DATA_DIR
|
||||||
|
)
|
||||||
)
|
)
|
||||||
return error
|
return error
|
||||||
|
|
||||||
|
|
||||||
def clone_private_data():
|
def clone_private_data():
|
||||||
exit_code = 0
|
|
||||||
if os.path.isdir(constants.PRIVATE_DATA_DIR):
|
if os.path.isdir(constants.PRIVATE_DATA_DIR):
|
||||||
initial = os.getcwd()
|
initial = os.getcwd()
|
||||||
os.chdir(constants.PRIVATE_DATA_DIR)
|
os.chdir(constants.PRIVATE_DATA_DIR)
|
||||||
|
@ -35,7 +35,8 @@ def clone_private_data():
|
||||||
out, error = shell.call(
|
out, error = shell.call(
|
||||||
"git clone -b master --single-branch {} {}".format(
|
"git clone -b master --single-branch {} {}".format(
|
||||||
config.get('private_repo'),
|
config.get('private_repo'),
|
||||||
constants.PRIVATE_DATA_DIR)
|
constants.PRIVATE_DATA_DIR
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if error:
|
if error:
|
||||||
return error
|
return error
|
||||||
|
@ -58,6 +59,7 @@ def go_to_data(subdir=''):
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
def clean():
|
def clean():
|
||||||
shutil.rmtree(constants.PUBLIC_DATA_DIR)
|
shutil.rmtree(constants.PUBLIC_DATA_DIR)
|
||||||
shutil.rmtree(constants.PRIVATE_DATA_DIR)
|
shutil.rmtree(constants.PRIVATE_DATA_DIR)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
def call(command):
|
def call(command):
|
||||||
shell = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
|
shell = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
|
||||||
output, error = shell.communicate()
|
output, error = shell.communicate()
|
||||||
|
|
Reference in a new issue