@@ -274,7 +274,7 @@ class Xxh:
274274 argp.add_argument('destination', metavar='[user@]host[:port]', help="Destination may be specified as [user@]host[:port] or host from ~/.ssh/config")
275275 argp.add_argument('+i','++install', default=False, action='store_true', help="Install xxh to destination host.")
276276 argp.add_argument('+if','++install-force', default=False, action='store_true', help="Removing the host xxh home and install xxh again.")
277- argp.add_argument('+c ','++config', default=self.config_file, help=f"Xxh config file in yaml. Default: " + self.config_file)
277+ argp.add_argument('+xc ','++xxh- config', default=self.config_file, help=f"Xxh config file in yaml. Default: " + self.config_file)
278278 argp.add_argument('+P','++password', help="Password for ssh auth.")
279279 argp.add_argument('+PP','++password-prompt', default=False, action='store_true', help="Enter password manually using prompt.")
280280 argp.add_argument('+lh','++local-xxh-home', default=self.local_xxh_home, help=f"Local xxh home path. Default: {self.local_xxh_home}")
@@ -301,7 +301,7 @@ class Xxh:
301301 self.vverbose = opt.vverbose
302302 self.url = url = self.parse_destination(opt.destination)
303303
304- xxh_config_file = pf"{opt.config }"
304+ xxh_config_file = pf"{opt.xxh_config }"
305305
306306 if xxh_config_file:
307307 if not xxh_config_file.exists():
@@ -313,7 +313,7 @@ class Xxh:
313313 with open(xxh_config_file) as f:
314314 xxh_config = yaml.safe_load(f)
315315
316- if 'hosts' in xxh_config:
316+ if xxh_config and 'hosts' in xxh_config:
317317 sys_args = sys.argv[1:]
318318 conf_args = []
319319 for h, hc in xxh_config['hosts'].items():
0 commit comments