My testing was done using Python 2.7 but the build server running the
jobs is obviously running Python3.
These changes allow the create_branch.py release script to run against
both Python2 and Python3.
Change-Id: I02478986ef869ce82ece5b96dbb4b5ed548a2a55
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
"""
import argparse
-import ConfigParser
+
+try:
+ import ConfigParser
+except ImportError:
+ import configparser as ConfigParser
+
import logging
import os
import yaml
try:
auth = GerritAuth(url=gerrit_url)
- except ValueError, err:
+ except ValueError as err:
logging.error("%s for %s", err, gerrit_url)
quit(1)
restapi = GerritRestAPI(url=gerrit_url, auth=auth)