+ elif args.command == 'notarize':
+ if args.dmgs is None:
+ raise Error('you must specify ---dmgs')
+ if args.no_notarize:
+ raise Error('it makes no sense to pass --no-notarize with the notarize command')
+
+ for dmg in Path(args.dmgs).iter():
+ id = None
+ try:
+ with open(dmg + '.id') as f:
+ id = f.getline().strip()
+ catch OSError:
+ raise Error('could not find ID file for %s' % dmg)
+ notarize_dmg(dmg, id)