Cleanup whitespace

This commit is contained in:
Markus Mittendrein 2018-11-30 15:03:09 +01:00
parent d4b08cba0e
commit 5896df1e64

12
cfgs.py
View File

@ -104,7 +104,7 @@ def init_dialog():
if not git_email: if not git_email:
git_email = config['GIT']['EMAIL'] git_email = config['GIT']['EMAIL']
config['GIT']['EMAIL'] = git_email config['GIT']['EMAIL'] = git_email
config['DEFAULT']['INITIALIZED'] = "True" config['DEFAULT']['INITIALIZED'] = "True"
update_config(config) update_config(config)
@ -254,13 +254,13 @@ def git_push(path, message = "configuration update"):
status = subprocess.call(["git", "add", "-A"], cwd=path) == 0 status = subprocess.call(["git", "add", "-A"], cwd=path) == 0
status |= subprocess.call(["git", "commit", "-a", "-m", message], cwd=path) == 0 status |= subprocess.call(["git", "commit", "-a", "-m", message], cwd=path) == 0
status |= subprocess.call(["git", "push", "-u", "origin", "master"], cwd=path) == 0 status |= subprocess.call(["git", "push", "-u", "origin", "master"], cwd=path) == 0
return status return status
def git_pull(path): def git_pull(path):
status = subprocess.call(["git", "pull", "origin", "master"], cwd=path) == 0 status = subprocess.call(["git", "pull", "origin", "master"], cwd=path) == 0
return status return status
@ -291,7 +291,7 @@ def init_local_repo():
# init git repo # init git repo
if not git_is_repo(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY']): if not git_is_repo(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY']):
git_init_repo(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY']) git_init_repo(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY'])
git_check_status(git_set_author(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY'], config['GIT']['USER'], config['GIT']['EMAIL'])) git_check_status(git_set_author(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY'], config['GIT']['USER'], config['GIT']['EMAIL']))
git_check_status(git_set_upstream(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY'], config['GIT']['REMOTE_REPOSITORY'])) git_check_status(git_set_upstream(config['DEFAULT']['LOCAL_STORAGE_DIRECTORY'], config['GIT']['REMOTE_REPOSITORY']))
@ -451,7 +451,7 @@ def restore():
target_directory = os.path.abspath(os.path.join(abs_path, os.pardir)) target_directory = os.path.abspath(os.path.join(abs_path, os.pardir))
if not os.path.exists(target_directory): if not os.path.exists(target_directory):
os.makedirs(target_directory) os.makedirs(target_directory)
if os.path.exists(abs_path): if os.path.exists(abs_path):
os.remove(abs_path) os.remove(abs_path)
@ -474,7 +474,7 @@ def restore():
def main(argv): def main(argv):
if not check_dependencies(): if not check_dependencies():
sys.exit(1) sys.exit(1)
if len(argv) == 2: if len(argv) == 2:
arg = argv[1] arg = argv[1]
if arg == "init": if arg == "init":