Skip to content

Commit

Permalink
Merge pull request #9 from rderewianko/patch-2
Browse files Browse the repository at this point in the history
Update sync.py
  • Loading branch information
badstreff authored Feb 6, 2018
2 parents 603e0ad + 9e1259a commit 59f1a04
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,20 @@ async def get_script_template(session, url, user, passwd, script):
async def main(args):
semaphore = asyncio.BoundedSemaphore(args.limit)
async with aiohttp.ClientSession() as session:
await upload_scripts(session, args.url, args.username, args.password, semaphore)
await upload_extension_attributes(session, args.url, args.username, args.password, semaphore)

async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=args.do_not_verify_ssl)) as session:
await upload_scripts(session, args.url, args.username, args.password, semaphore)
await upload_extension_attributes(session, args.url, args.username, args.password, semaphore)

if __name__ == '__main__':
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())

parser = argparse.ArgumentParser(description='Sync repo with JSS')
parser = argparse.ArgumentParser(description='Sync repo with JamfPro')
parser.add_argument('--url')
parser.add_argument('--username')
parser.add_argument('--password')
parser.add_argument('--limit', type=int, default=25)
parser.add_argument('--verbose', action='store_true')
parser.add_argument('--do_not_verify_ssl', action='store_false')
args = parser.parse_args()

loop = asyncio.get_event_loop()
Expand Down

0 comments on commit 59f1a04

Please sign in to comment.