标签:etc ESS aliyun exception sub ror RoCE name .com
import subprocess import sys import os def main(): try: subprocess.call(["cd /etc/yum.repos.d/ && mkdir repo_bak && mv *.repo repo_bak/"], shell=True) subprocess.call([" yum install wget -y && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo"], shell=True) subprocess.call(["yum clean all && yum makecache && yum repolist"], shell=True) sys.exit(0) except Exception as e: print(e) sys.exit(1) if __name__ == ‘__main__‘: main()
标签:etc ESS aliyun exception sub ror RoCE name .com
原文地址:https://www.cnblogs.com/effortsing/p/9986325.html