Giter Club home page Giter Club logo

Comments (3)

curtinlv avatar curtinlv commented on August 24, 2024

好的,我加上试试,谢谢反馈。

from jd-script.

curtinlv avatar curtinlv commented on August 24, 2024

还是有人反馈会卡住。我没有v4环境,但模拟读取config.sh又是没有问题。

from jd-script.

sxx1314 avatar sxx1314 commented on August 24, 2024

满尴尬的,实测专门为了v4特殊处理的这部分代码删掉就能正常无障碍运行。

JD-Script/jd_qjd.py

Lines 268 to 281 in 3b49cf4

# 获取v4环境 特殊处理
if os.path.exists(v4f):
try:
with open(v4f, 'r', encoding='utf-8') as f:
curenv = locals()
for i in f.readlines():
r = re.compile(r'^export\s(.*?)=[\'\"]?([\w\.\-@#!&=_,\[\]\{\}\(\)]{1,})+[\'\"]{0,1}$', re.M | re.S | re.I)
r = r.findall(i)
if len(r) > 0:
for i in r:
if i[0] != 'JD_COOKIE':
curenv[i[0]] = getEnvs(i[1])
except:
pass

如果不删,所有脚本都会卡当前环境v4。
目前还是推荐优先获取env变量,一旦获取就不执行任何其他操作,因为互助账号等变量都需要从env获取,就别优先去config里取了。

from jd-script.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.