mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
build(metaUpdater): Handle Non-Existant Files
If .zenodo.json (or codemeta.json) isn't there, only throw a warning, and continue.
This commit is contained in:
parent
8086a04fb3
commit
6f4c98fca2
|
@ -11,6 +11,9 @@ from collections import OrderedDict
|
|||
|
||||
|
||||
class Manipulator(object):
|
||||
def __str__(self):
|
||||
return self.__class__.__name__
|
||||
|
||||
def load(self, filename):
|
||||
with open(filename, 'rb') as fp:
|
||||
self.data = json.load(fp, object_pairs_hook=OrderedDict)
|
||||
|
@ -150,7 +153,11 @@ def main():
|
|||
args = parser.parse_args()
|
||||
|
||||
for manipulator in (CodeMetaManipulator(), ZenodoManipulator()):
|
||||
try:
|
||||
manipulator.load()
|
||||
except FileNotFoundError as e:
|
||||
print('*** Skipping {}: {}'.format(manipulator, e))
|
||||
continue
|
||||
if args.newversion is not None:
|
||||
manipulator.version(args.newversion)
|
||||
manipulator.update_authors()
|
||||
|
|
Loading…
Reference in New Issue
Block a user