globls.debug = True else: raise Exception() except SystemExit: raise except: if globls.debug: traceback.print_exc() utils.print_exit("error: bad/missing argument(s)") if domain_home == None: utils.print_exit("error: bad/missing argument(s)") try: domain = Domain(domain_home) if not domain.is_compatible(): utils.print_exit(MSG_INCOMPATIBLE_DOMAIN) if not domain.is_frozen(): utils.print_exit("warning: domain not frozen") domain.unfreeze() except SystemExit: raise except utils.SSMExitException, detail: utils.print_exit(detail) except: if globls.debug: traceback.print_exc() utils.print_exit("error: could not unfreeze domain") sys.exit(0)
except: if globls.debug: traceback.print_exc() utils.print_exit("error: bad/missing argument(s)") if src_domain_home == dst_domain_home == None: utils.print_exit("error: missing argument(s)") if not clone_domain and not clone_installed and not clone_published: clone_domain = clone_installed = clone_published = True try: src_domain = Domain(src_domain_home) dst_domain = Domain(dst_domain_home) alt_src_domain = alt_src_domain_home and Domain(alt_src_domain_home) if not src_domain.is_compatible(): utils.print_exit(MSG_INCOMPATIBLE_DOMAIN) if alt_src_domain and not alt_src_domain.is_compatible(): utils.print_exit(MSG_INCOMPATIBLE_DOMAIN) sources = repo_url or (alt_src_domain or src_domain).get_sources() repo = Repository(sources) if clone_domain: # create new domain utils.print_verbose("creating new domain (%s)" % dst_domain_home) dst_domain.create(label, sources) # populating subdomains utils.print_verbose("setting subdomains") dst_domain.set_subdomains(src_domain.get_subdomains())