File tree 4 files changed +11
-10
lines changed
4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ def _setup_parser():
189
189
190
190
def main_cli ():
191
191
"""Function represents main entrypoint for the
192
- osia intaller
192
+ osia installer
193
193
194
194
It sets up the cli and starts the executor."""
195
195
parser = _setup_parser ()
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def _resolve_cloud_name(args: argparse.Namespace) -> Optional[Dict]:
41
41
for env in defaults ['CLOUD' ][args .cloud ]['environments' ]:
42
42
if env ['name' ] == default_env :
43
43
return env
44
- logging .debug ("No environment found, maybe all variables are passed from command line" )
44
+ logging .warning ("No environment found, maybe all variables are passed from command line" )
45
45
return None
46
46
47
47
Original file line number Diff line number Diff line change @@ -150,5 +150,5 @@ def download_installer(installer_version: str,
150
150
if root .exists () and root .joinpath ('openshift-install' ).exists ():
151
151
logging .info ('Found installer at %s' , root .as_posix ())
152
152
return root .joinpath ('openshift-install' ).as_posix ()
153
- root .mkdir (parents = True )
153
+ root .mkdir (parents = True , exist_ok = True )
154
154
return get_installer (url , root .as_posix ())
Original file line number Diff line number Diff line change @@ -33,11 +33,12 @@ def check_repository():
33
33
current tracking branch."""
34
34
rep = Repo ("./" )
35
35
remote = rep .active_branch .tracking_branch ()
36
- fetches = rep .remotes [remote .remote_name ].fetch ()
37
- for fetch in fetches :
38
- if fetch .name == remote .name and fetch .commit != rep .commit ():
39
- logging .warning ("There are changes in remote repository, trying to pull" )
40
- rep .remotes [remote .remote_name ].pull ()
36
+ if remote :
37
+ fetches = rep .remotes [remote .remote_name ].fetch ()
38
+ for fetch in fetches :
39
+ if fetch .name == remote .name and fetch .commit != rep .commit ():
40
+ logging .warning ("There are changes in remote repository, trying to pull" )
41
+ rep .remotes [remote .remote_name ].pull ()
41
42
if rep .is_dirty ():
42
43
logging .warning ("There are not committed changes in your repository, please fix this" )
43
44
@@ -52,8 +53,8 @@ def write_changes(cluster_directory):
52
53
rep .index .add (cluster_directory )
53
54
logging .info ("Commiting installer changes for cluster %s" , cluster_directory )
54
55
rep .index .commit (f"[OCP Installer] installation files for { cluster_directory } added" )
55
-
56
- rep .remotes [remote .remote_name ].push ()
56
+ if remote :
57
+ rep .remotes [remote .remote_name ].push ()
57
58
58
59
59
60
def delete_directory (cluster_directory ):
You can’t perform that action at this time.
0 commit comments