mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-17 19:17:21 +00:00
fix __config__ without oldver and newver
This commit is contained in:
parent
dfefcd4db9
commit
3226a76cfe
@ -73,11 +73,14 @@ class Source:
|
||||
config.read_file(file)
|
||||
if '__config__' in config:
|
||||
c = config['__config__']
|
||||
d = os.path.dirname(file.name)
|
||||
self.oldver = os.path.expandvars(os.path.expanduser(
|
||||
os.path.join(d, c.get('oldver'))))
|
||||
self.newver = os.path.expandvars(os.path.expanduser(
|
||||
os.path.join(d, c.get('newver'))))
|
||||
|
||||
if 'oldver' in c and 'newver' in c:
|
||||
d = os.path.dirname(file.name)
|
||||
self.oldver = os.path.expandvars(os.path.expanduser(
|
||||
os.path.join(d, c.get('oldver'))))
|
||||
self.newver = os.path.expandvars(os.path.expanduser(
|
||||
os.path.join(d, c.get('newver'))))
|
||||
|
||||
self.max_concurrent = c.getint('max_concurrent', 20)
|
||||
session.nv_config = config["__config__"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user