# HG changeset patch # User John Rouillard # Date 1709605420 18000 # Node ID 2a6c3eb4e0593c5fe282fadb9671d6ae62a3286b # Parent 9ba04f37896f9de67916b8ce3a7453634a2fbb7a chore: lint script diff -r 9ba04f37896f -r 2a6c3eb4e059 scripts/copy-user.py --- a/scripts/copy-user.py Mon Mar 04 21:18:51 2024 -0500 +++ b/scripts/copy-user.py Mon Mar 04 21:23:40 2024 -0500 @@ -16,7 +16,9 @@ """ from __future__ import print_function + import sys + import roundup.instance @@ -50,7 +52,7 @@ for userid in userids: try: userid = str(int(userid)) - except ValueError as why: + except ValueError: print("Not a numeric user id: %s Skipping ..." % (userid,)) continue if userid not in userlist: @@ -66,7 +68,7 @@ db2.user.lookup(user['username']) print("User %s: Username '%s' exists in target instance. Skipping ..." % (userid, user['username'])) continue - except KeyError as why: + except KeyError: pass print("Copying user %s (%s) ..." % (userid, user['username'])) db2.user.create(**user)