Cleanup whitespace

This commit is contained in:
Markus Mittendrein 2018-11-30 15:03:09 +01:00
parent d4b08cba0e
commit 5896df1e64
1 changed files with 6 additions and 6 deletions

12
cfgs.py
View File

@ -104,7 +104,7 @@ def init_dialog():
if not git_email:
git_email = config['GIT']['EMAIL']
config['GIT']['EMAIL'] = git_email
config['DEFAULT']['INITIALIZED'] = "True"
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", "commit", "-a", "-m", message], cwd=path) == 0
status |= subprocess.call(["git", "push", "-u", "origin", "master"], cwd=path) == 0
return status
def git_pull(path):
status = subprocess.call(["git", "pull", "origin", "master"], cwd=path) == 0
return status
@ -291,7 +291,7 @@ def init_local_repo():
# init git repo
if not git_is_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_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))
if not os.path.exists(target_directory):
os.makedirs(target_directory)
if os.path.exists(abs_path):
os.remove(abs_path)
@ -474,7 +474,7 @@ def restore():
def main(argv):
if not check_dependencies():
sys.exit(1)
if len(argv) == 2:
arg = argv[1]
if arg == "init":