summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorSarah Owens <sarato@inkylabs.com>2012-11-01 22:59:27 -0700
committerSarah Owens <sarato@inkylabs.com>2012-11-13 17:33:56 -0800
commitcecd1d864fc3cf02cf50d367111e0d0e173c5dc6 (patch)
treeb4f660400560dce21cd7a00ffe5a5d74b54bcb81 /manifest_xml.py
parentfc241240d828d7e8302dc0876608a9d27ae1cbc7 (diff)
downloadgit-repo-cecd1d864fc3cf02cf50d367111e0d0e173c5dc6.tar.gz
Change print statements to work in python3
This is part of a series of changes to introduce Python3 support. Change-Id: I373be5de7141aa127d7debdbce1df39148dbec32
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 31987248..bb93bca3 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -13,6 +13,7 @@
13# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
14# limitations under the License. 14# limitations under the License.
15 15
16from __future__ import print_function
16import itertools 17import itertools
17import os 18import os
18import re 19import re
@@ -306,8 +307,9 @@ class XmlManifest(object):
306 307
307 local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME) 308 local = os.path.join(self.repodir, LOCAL_MANIFEST_NAME)
308 if os.path.exists(local): 309 if os.path.exists(local):
309 print >>sys.stderr, 'warning: %s is deprecated; put local manifests in %s instead' % \ 310 print('warning: %s is deprecated; put local manifests in %s instead'
310 (LOCAL_MANIFEST_NAME, LOCAL_MANIFESTS_DIR_NAME) 311 % (LOCAL_MANIFEST_NAME, LOCAL_MANIFESTS_DIR_NAME),
312 file=sys.stderr)
311 nodes.append(self._ParseManifestXml(local, self.repodir)) 313 nodes.append(self._ParseManifestXml(local, self.repodir))
312 314
313 local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME)) 315 local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME))
@@ -317,7 +319,7 @@ class XmlManifest(object):
317 try: 319 try:
318 nodes.append(self._ParseManifestXml(local_file, self.repodir)) 320 nodes.append(self._ParseManifestXml(local_file, self.repodir))
319 except ManifestParseError as e: 321 except ManifestParseError as e:
320 print >>sys.stderr, '%s' % str(e) 322 print('%s' % str(e), file=sys.stderr)
321 except OSError: 323 except OSError:
322 pass 324 pass
323 325